dinodave 0.3.0

A libnodave binding for D


To use this package, put the following dependency into your project's dependencies section:

dub.json
dub.sdl

dinodave

Build Status Dub version Dub download Status

A simple D binding to LIBNODAVE, a free library to communicate to Siemens S7 PLCs

Compiling

With dub:

$ dub build

with make (linux):

$ make

(win32)

$ make -f makefile.win32

On Win32 see also wiki.

Testing

With dub:

$ dub test

with make (only for linux):

$ make test

Example usage

import std.stdio;
import dinodave;

void main(string[] args) {
   enum string IP = "192.168.221.102";
   enum DB = 11;
   try {
      auto s7 = new IsoTcp(IP);
      s7.openConnection();
      scope(exit) s7.closeConnection();

      int start = 160;
      int length = 2;
      s7.readBytes(DB, start, length);

      int a = s7.getU16();
      writeln("db11.160: ", a);

   } catch(Exception e) {
      writeln(e);
   }
}

See also directory examples/ and wiki.

Compiling and running code examples

The code examples in examples directory are simple applications that perform simple PLC operations

For some examples (float and read_write) dub includes subpackage, so to compile:

$ make s=float

or

$ dub build dinodave:float

for the other examples:

$ cd examples/x
$ make

Install libnodave

$ git clone git@github.com:netdata/libnodave.git
$ cd libnodave
$ make
$ sudo make install

or use install-libnodave.sh

Authors:
Orfeo Da Viá
Dependencies:
none
Versions:
0.3.0 2017-Oct-10
0.2.0 2014-Oct-30
0.1.0 2014-Oct-28
~master 2017-Nov-17
Show all 4 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 0 downloads this month

  • 202 downloads total