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

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

?? ldmicro.txt

?? 用PIC單片機與AVR單片機製作PLC控制的階梯圖程序。
?? TXT
?? 第 1 頁 / 共 4 頁
字號:

INTRODUCTION
============

LDmicro generates native code for certain Microchip PIC16 and Atmel AVR
microcontrollers. Usually software for these microcontrollers is written
in a programming language like assembler, C, or BASIC. A program in one
of these languages comprises a list of statements. These languages are
powerful and well-suited to the architecture of the processor, which
internally executes a list of instructions.

PLCs, on the other hand, are often programmed in `ladder logic.' A simple
program might look like this:

   ||                                                                    ||
   ||    Xbutton1           Tdon           Rchatter           Yred       ||
 1 ||-------]/[---------[TON 1.000 s]-+-------]/[--------------( )-------||
   ||                                 |                                  ||
   ||    Xbutton2           Tdof      |                                  ||
   ||-------]/[---------[TOF 2.000 s]-+                                  ||
   ||                                                                    ||
   ||                                                                    ||
   ||                                                                    ||
   ||    Rchatter            Ton             Tnew           Rchatter     ||
 2 ||-------]/[---------[TON 1.000 s]----[TOF 1.000 s]---------( )-------||
   ||                                                                    ||
   ||                                                                    ||
   ||                                                                    ||
   ||------[END]---------------------------------------------------------||
   ||                                                                    ||
   ||                                                                    ||

(TON is a turn-on delay; TOF is a turn-off delay. The --] [-- statements
are inputs, which behave sort of like the contacts on a relay. The
--( )-- statements are outputs, which behave sort of like the coil of a
relay. Many good references for ladder logic are available on the Internet
and elsewhere; details specific to this implementation are given below.)

A number of differences are apparent:

    * The program is presented in graphical format, not as a textual list
      of statements. Many people will initially find this easier to
      understand.

    * At the most basic level, programs look like circuit diagrams, with
      relay contacts (inputs) and coils (outputs). This is intuitive to
      programmers with knowledge of electric circuit theory.

    * The ladder logic compiler takes care of what gets calculated
      where. You do not have to write code to determine when the outputs
      have to get recalculated based on a change in the inputs or a
      timer event, and you do not have to specify the order in which
      these calculations must take place; the PLC tools do that for you.

LDmicro compiles ladder logic to PIC16 or AVR code. The following
processors are supported:
    * PIC16F877
    * PIC16F628
    * PIC16F876 (untested)
    * PIC16F88 (untested)
    * PIC16F819 (untested)
    * ATmega128
    * ATmega64
    * ATmega162 (untested)
    * ATmega32 (untested)
    * ATmega16 (untested)
    * ATmega8 (untested)

It would be easy to support more AVR or PIC16 chips, but I do not have
any way to test them. If you need one in particular then contact me and
I will see what I can do.

Using LDmicro, you can draw a ladder diagram for your program. You can
simulate the logic in real time on your PC. Then when you are convinced
that it is correct you can assign pins on the microcontroller to the
program inputs and outputs. Once you have assigned the pins, you can
compile PIC or AVR code for your program. The compiler output is a .hex
file that you can program into your microcontroller using any PIC/AVR
programmer.

LDmicro is designed to be somewhat similar to most commercial PLC
programming systems. There are some exceptions, and a lot of things
aren't standard in industry anyways. Carefully read the description
of each instruction, even if it looks familiar. This document assumes
basic knowledge of ladder logic and of the structure of PLC software
(the execution cycle: read inputs, compute, write outputs).


ADDITIONAL TARGETS
==================

It is also possible to generate ANSI C code. You could use this with any
processor for which you have a C compiler, but you are responsible for
supplying the runtime. That means that LDmicro just generates source
for a function PlcCycle(). You are responsible for calling PlcCycle
every cycle time, and you are responsible for implementing all the I/O
(read/write digital input, etc.) functions that the PlcCycle() calls. See
the comments in the generated source for more details.

Finally, LDmicro can generate processor-independent bytecode for a
virtual machine designed to run ladder logic code. I have provided a
sample implementation of the interpreter/VM, written in fairly portable
C. This target will work for just about any platform, as long as you
can supply your own VM. This might be useful for applications where you
wish to use ladder logic as a `scripting language' to customize a larger
program. See the comments in the sample interpreter for details.


COMMAND LINE OPTIONS
====================

ldmicro.exe is typically run with no command line options. That means
that you can just make a shortcut to the program, or save it to your
desktop and double-click the icon when you want to run it, and then you
can do everything from within the GUI.

If LDmicro is passed a single filename on the command line
(e.g. `ldmicro.exe asd.ld'), then LDmicro will try to open `asd.ld',
if it exists. An error is produced if `asd.ld' does not exist. This
means that you can associate ldmicro.exe with .ld files, so that it runs
automatically when you double-click a .ld file.

If LDmicro is passed command line arguments in the form
`ldmicro.exe /c src.ld dest.hex', then it tries to compile `src.ld',
and save the output as `dest.hex'. LDmicro exits after compiling,
whether the compile was successful or not. Any messages are printed
to the console. This mode is useful only when running LDmicro from the
command line.


BASICS
======

If you run LDmicro with no arguments then it starts with an empty
program. If you run LDmicro with the name of a ladder program (xxx.ld)
on the command line then it will try to load that program at startup.
LDmicro uses its own internal format for the program; it cannot import
logic from any other tool.

If you did not load an existing program then you will be given a program
with one empty rung. You could add an instruction to it; for example
you could add a set of contacts (Instruction -> Insert Contacts) named
`Xnew'. `X' means that the contacts will be tied to an input pin on the
microcontroller. You could assign a pin to it later, after choosing a
microcontroller and renaming the contacts. The first letter of a name
indicates what kind of object it is.  For example:

    * Xname -- tied to an input pin on the microcontroller
    * Yname -- tied to an output pin on the microcontroller
    * Rname -- `internal relay': a bit in memory
    * Tname -- a timer; turn-on delay, turn-off delay, or retentive
    * Cname -- a counter, either count-up or count-down
    * Aname -- an integer read from an A/D converter
    * name  -- a general-purpose (integer) variable

Choose the rest of the name so that it describes what the object does,
and so that it is unique within the program. The same name always refers
to the same object within the program. For example, it would be an error
to have a turn-on delay (TON) called `Tdelay' and a turn-off delay (TOF)
called `Tdelay' in the same program, since each counter needs its own
memory. On the other hand, it would be correct to have a retentive timer
(RTO) called `Tdelay' and a reset instruction (RES) associated with
`Tdelay', since it that case you want both instructions to work with
the same timer.

Variable names can consist of letters, numbers, and underscores
(_). A variable name must not start with a number. Variable names are
case-sensitive.

The general variable instructions (MOV, ADD, EQU, etc.) can work on
variables with any name. This means that they can access timer and
counter accumulators. This may sometimes be useful; for example, you
could check if the count of a timer is in a particular range.

Variables are always 16 bit integers. This means that they can go
from -32768 to 32767. Variables are always treated as signed. You can
specify literals as normal decimal numbers (0, 1234, -56). You can also
specify ASCII character values ('A', 'z') by putting the character in
single-quotes. You can use an ASCII character code in most places that
you could use a decimal number.

At the bottom of the screen you will see a list of all the objects in
the program. This list is automatically generated from the program;
there is no need to keep it up to date by hand. Most objects do not
need any configuration. `Xname', `Yname', and `Aname' objects must be
assigned to a pin on the microcontroller, however. First choose which
microcontroller you are using (Settings -> Microcontroller). Then assign
your I/O pins by double-clicking them on the list.

You can modify the program by inserting or deleting instructions. The
cursor in the program display blinks to indicate the currently selected
instruction and the current insertion point. If it is not blinking then
press <Tab> or click on an instruction. Now you can delete the current
instruction, or you can insert a new instruction to the right or left
(in series with) or above or below (in parallel with) the selected
instruction. Some operations are not allowed. For example, no instructions
are allowed to the right of a coil.

The program starts with just one rung. You can add more rungs by selecting
Insert Rung Before/After in the Logic menu. You could get the same effect
by placing many complicated subcircuits in parallel within one rung,
but it is more clear to use multiple rungs.

Once you have written a program, you can test it in simulation, and then
you can compile it to a HEX file for the target microcontroller.


SIMULATION
==========

To enter simulation mode, choose Simulate -> Simulation Mode or press
<Ctrl+M>. The program is shown differently in simulation mode. There is
no longer a cursor. The instructions that are energized show up bright
red; the instructions that are not appear greyed. Press the space bar to
run the PLC one cycle. To cycle continuously in real time, choose
Simulate -> Start Real-Time Simulation, or press <Ctrl+R>. The display of
the program will be updated in real time as the program state changes.

You can set the state of the inputs to the program by double-clicking
them in the list at the bottom of the screen, or by double-clicking an
`Xname' contacts instruction in the program. If you change the state of
an input pin then that change will not be reflected in how the program
is displayed until the PLC cycles; this will happen automatically if
you are running a real time simulation, or when you press the space bar.


COMPILING TO NATIVE CODE
========================

Ultimately the point is to generate a .hex file that you can program
into your microcontroller. First you must select the part number of the
microcontroller, under the Settings -> Microcontroller menu. Then you
must assign an I/O pin to each `Xname' or `Yname' object. Do this by
double-clicking the object name in the list at the bottom of the screen.
A dialog will pop up where you can choose an unallocated pin from a list.

Then you must choose the cycle time that you will run with, and you must
tell the compiler what clock speed the micro will be running at. These
are set under the Settings -> MCU Parameters... menu. In general you
should not need to change the cycle time; 10 ms is a good value for most

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩精品在线看片z| 日韩手机在线导航| av一区二区三区在线| 国产一区二区电影| 国内精品伊人久久久久av一坑| 奇米影视一区二区三区小说| 日韩精彩视频在线观看| 免费成人小视频| 久久www免费人成看片高清| 久草这里只有精品视频| 精品一区二区三区在线播放| 国产自产高清不卡| 福利一区二区在线观看| 成人午夜视频网站| 91国偷自产一区二区三区观看| 色网站国产精品| 91精品国产高清一区二区三区蜜臀 | 成人综合婷婷国产精品久久蜜臀 | 成人激情免费视频| 99国产精品久久久久| 欧美在线你懂的| 91精品在线免费观看| 久久久亚洲精品一区二区三区| 欧美激情一区二区三区蜜桃视频| 亚洲天堂精品在线观看| 亚洲成年人网站在线观看| 精品影视av免费| 91一区二区在线| 日韩女优制服丝袜电影| 国产精品无码永久免费888| 亚洲精品国产一区二区精华液 | 蜜臀av亚洲一区中文字幕| 国产高清精品久久久久| 在线视频你懂得一区| 欧美va天堂va视频va在线| 1024精品合集| 九九热在线视频观看这里只有精品| 成人国产在线观看| 在线91免费看| 国产精品久久久久影院| 久久精品国产精品青草| 色一情一乱一乱一91av| 精品国产伦一区二区三区免费| 国产精品久久看| 免费不卡在线观看| 在线观看不卡视频| 欧美经典三级视频一区二区三区| 亚洲线精品一区二区三区| 高清在线成人网| 日韩欧美一区中文| 亚洲不卡av一区二区三区| 成人涩涩免费视频| 久久综合久久鬼色中文字| 亚洲高清视频的网址| 91香蕉国产在线观看软件| 亚洲精品一线二线三线无人区| 亚洲小说春色综合另类电影| 成人深夜福利app| 久久精品人人做人人爽97| 人人超碰91尤物精品国产| 欧美丝袜丝nylons| 亚洲精品日日夜夜| 91视频国产资源| 自拍偷在线精品自拍偷无码专区| 国产精品77777竹菊影视小说| 日韩欧美国产精品| 蜜桃免费网站一区二区三区| 欧美日韩极品在线观看一区| 亚洲自拍偷拍网站| 色欧美乱欧美15图片| 亚洲人成小说网站色在线| 成人精品一区二区三区中文字幕| 久久久精品免费网站| 国产高清亚洲一区| 国产视频一区二区在线| 成人午夜在线播放| 国产精品传媒入口麻豆| 色综合一区二区三区| 成人欧美一区二区三区视频网页 | 欧美电影免费观看高清完整版在线观看| 一区二区三区四区国产精品| 一本一道久久a久久精品| 亚洲精品国产第一综合99久久 | 一本到一区二区三区| 亚洲乱码中文字幕| 精品视频在线视频| 免费精品视频在线| 久久网站最新地址| 成人综合在线观看| 一区二区三区日本| 日韩一区二区在线看片| 韩国欧美国产1区| 中文在线免费一区三区高中清不卡| 国产91丝袜在线18| 亚洲另类色综合网站| 欧美二区三区91| 激情国产一区二区| 亚洲视频图片小说| 欧美精品一二三区| 岛国一区二区三区| 亚洲五码中文字幕| 久久综合五月天婷婷伊人| 99九九99九九九视频精品| 亚洲二区在线视频| 久久久综合视频| 欧美亚洲尤物久久| 国产一区二区在线电影| 一区二区三区 在线观看视频| 欧美一区午夜精品| 91亚洲国产成人精品一区二区三| 日韩av在线播放中文字幕| 久久久99精品免费观看| 欧美午夜不卡在线观看免费| 久久精品国产精品亚洲红杏| 亚洲视频在线一区观看| 日韩视频在线你懂得| 91在线视频18| 国产麻豆成人传媒免费观看| 亚洲精品视频免费观看| 久久精品男人的天堂| 在线不卡一区二区| 91极品美女在线| 国产成人精品三级| 麻豆91在线播放免费| 亚洲男人天堂av网| 亚洲国产高清在线观看视频| 91精品国产综合久久久久久久| 99久久精品免费看国产免费软件| 久久精品国产一区二区| 亚洲午夜电影在线观看| 欧美经典一区二区| 日韩欧美一区二区三区在线| 欧美在线观看视频一区二区| 成人午夜电影小说| 国产麻豆精品在线观看| 奇米影视一区二区三区小说| 亚洲国产乱码最新视频 | 欧美一区二区网站| 欧美色倩网站大全免费| 色嗨嗨av一区二区三区| 波多野结衣亚洲| 懂色av中文一区二区三区| 国内精品写真在线观看| 国内一区二区视频| 国内精品视频666| 国产一区二区三区在线观看精品 | 亚洲午夜羞羞片| 亚洲精品第1页| 樱桃视频在线观看一区| 亚洲精品免费在线| 伊人性伊人情综合网| 亚洲人成亚洲人成在线观看图片| 国产精品久久久久久久久久久免费看| 久久久久高清精品| 国产精品情趣视频| 最新高清无码专区| 一卡二卡三卡日韩欧美| 亚洲一级二级三级| 日韩av一级电影| 久久成人18免费观看| 国产精品一区二区在线观看网站| 国产高清不卡二三区| proumb性欧美在线观看| 色综合天天狠狠| 欧美天堂亚洲电影院在线播放| 欧美久久一二三四区| 精品免费视频.| 欧美激情一区二区三区| 亚洲精选视频在线| 亚洲成av人片在线| 韩国v欧美v亚洲v日本v| 成人爽a毛片一区二区免费| 色综合网站在线| 日韩午夜激情视频| 国产欧美日韩视频一区二区| 自拍偷在线精品自拍偷无码专区| 亚洲国产精品麻豆| 国产一区二区三区在线观看免费视频| 国产成人综合在线| 色呦呦日韩精品| 日韩美一区二区三区| 中文字幕在线不卡一区二区三区| 亚洲一区二区四区蜜桃| 久久精品国产免费看久久精品| 成人v精品蜜桃久久一区| 欧美午夜寂寞影院| 国产亚洲短视频| 午夜精品成人在线| 成人精品高清在线| 在线不卡a资源高清| 国产精品久久久久久久久久免费看| 三级欧美韩日大片在线看| 国产91高潮流白浆在线麻豆| 欧美日韩国产大片| 中国色在线观看另类| 麻豆一区二区三区| 欧洲一区在线电影| 国产精品久久久久久久久果冻传媒 | 成人av第一页| 精品国产乱码久久久久久图片|