README.md in ladder_drive-0.5.2 vs README.md in ladder_drive-0.6.0
- old
+ new
@@ -2,37 +2,37 @@
# LadderDrive
The ladder_drive is a simple abstract ladder for PLC (Programmable Logic Controller).
-We aim to design abstraction ladder which is able to run on any PLC with same ladder source or binary and prepare full stack tools.
+We aim to design the abstraction ladder which can run on any PLC with same ladder source or binary and prepare full stack tools.
# Getting started
It's required the Ruby environment.
-To prepare the Ruby environment, please find web sites.
+To prepare the Ruby environment, please find websites.
Install LadderDrive at the command prompt.
```sh
$ gem install ladder_drive
```
[![https://gyazo.com/6f00d74612def41fb33d836275b74c24](https://i.gyazo.com/6f00d74612def41fb33d836275b74c24.gif)](https://gyazo.com/6f00d74612def41fb33d836275b74c24)
-# Create an LadderDrive project
+# Create a LadderDrive project
At the command prompt, create a new LadderDrive project.
```sh
$ ladder_drive create my_project
$ cd my_project
```
[![https://gyazo.com/c538f66129aa425e2b1da4f478a10f52](https://i.gyazo.com/c538f66129aa425e2b1da4f478a10f52.gif)](https://gyazo.com/c538f66129aa425e2b1da4f478a10f52)
-Created files are consisted like the tree below.
+Created files have consisted like the tree below.
```
.
├── Rakefile
├── asm
@@ -50,24 +50,24 @@
# Connection configuration
## PLC configuration
There is a plc project under the plc directory.
-Launch the one of the plc project which you want to use.
-(Currently we support the Emulator and MITSUBISHI iQ-R R08CUP only.)
+Launch one of the plc projects which you want to use.
+(Currently, we support the Emulator and MITSUBISHI iQ-R R08CUP only.)
Configure ethernet connection by the tool which is provided by plc maker.
Then upload settings and plc program to the plc.
[![](http://img.youtube.com/vi/fGdyIo9AmuE/0.jpg)](https://youtu.be/fGdyIo9AmuE)
## LadderDrive configuration
There is a configuration file at config/plc.yml.
-Currently we support MITSUBISHI iQ-R R08CUP and the Emulator.
-You only change host to an ip address of your plc.
+Currently, we support MITSUBISHI iQ-R R08CUP and the Emulator.
+You only change host to an IP address of your plc.
```
# plc.yml
plc: # Beginning of PLC section.
iq-r: # It's a target name
@@ -80,13 +80,13 @@
[![](http://img.youtube.com/vi/m0JaOBFIHqw/0.jpg)](https://youtu.be/m0JaOBFIHqw)
## LadderDrive programming
-LadderDrive program file is located under the asm directory.
+The Ladderdrive program file is located under the asm directory.
By default, use asm/main.esc.
-Edit it and programming.
+Edit it and programming.
Refer [Wiki](https://github.com/ito-soft-design/ladder_drive/wiki/mnemonic) to check mnemonic.
```
# main.esc
@@ -124,11 +124,11 @@
```
```rake``` is same as ```rake target=iq-r```.
-The LadderDrive program runs immediately after uploaded.
+The LadderDrive program runs immediately after upload.
```sh
$ rake [target=iq-r]
uploading build/main.hex ...
launching emulator ...
@@ -139,11 +139,11 @@
This is a console to communicate with PLC.
>
```
-After uploaded the program, it becomes in to console mode.
+After uploading the program, it becomes in to console mode.
You can read and write a device by entering commands.
Use the r command if you want to read devices.
Below example reads values of devices from M0 to M7.
@@ -186,21 +186,22 @@
X or Y devices are assigned to GPIOs.
### Installation
```sh
+$ sudo apt-get update
$ sudo apt-get install ruby-dev
$ sudo apt-get install libssl-dev
-$ sudo gem install ladder_drive
+$ sudo gem install ladder_drive --no-ri --no-rdoc
```
### Execution
```sh
$ ladder_drive create project
$ cd project
-$ rake target=raspberrypi
+$ sudo rake target=raspberrypi
```
### I/O settings
You can describe io configuration by confing/plc.yml file.
@@ -265,9 +266,41 @@
plc["D0"] = 123
plc["D0"] # => 123
plc["D0", 10] = [0, 1, 2, ..., 9]
plc["D0".."D9"] => [0, 1, 2, ..., 9]
```
+
+## Plugin
+
+If you want to an enhancement function Ladder drive running on Unix based machine, use a plugin.
+
+Put xxx_plugin.rb into your project's plugins directory.
+xxx is the name of the plugin. i.e.) If your plugin name is 'bar' then xxx is 'bar' . -> bar_plugin.rb
+
+### Callbacks
+
+Ladder drive calls ```plugin_xxx_init``` function for the initialization. If you need to initialize it, to do here.
+
+It also calls ```plugin_xxx_exec``` for execution of your plugin.
+
+### plugins
+
+Ladder drive has several plugins by default.
+If you want to use a plugin, execute below command.
+
+```
+$ ladder_drive plugin plugin_name
+```
+
+|Plugin name|description|
+|:--|:--|
+|ifttt|Launch IFTTT's Webhooks trigger service.|
+|google_drive|Writing data to Google spreadsheet.|
+|plc_mapper|Share other PLCs data with Ladder drive device.|
+|slack|Cast the data to the Slack.|
+|trello|Move the card of Trello to specified list.|
+
+
# Information related ladder_drive
- [My japanese diary [ladder_drive]](http://diary.itosoft.com/?category=ladder_drive)
- [Wiki](https://github.com/ito-soft-design/ladder_drive/wiki/)