dinodave.nodave

This module contains bindings to types and functions from the nodave C header <nodavesimple.h>.

Members

Functions

daveGetSeconds
float daveGetSeconds(daveConnection* dc)

Get time in seconds from current read position

daveGetSecondsAt
float daveGetSecondsAt(daveConnection* dc, int pos)

Get time in seconds from random position

daveNewConnection
daveConnection* daveNewConnection(daveInterface* di, int MPI, int rack, int slot)

Setup a new connection structure using an initialized daveInterface and PLC's MPI address.

daveNewInterface
daveInterface* daveNewInterface(_daveOSserialType nfd, const(char)* nname, int localMPI, int protocol, int speed)

Create a daveInterface structure.

daveReadBytes
int daveReadBytes(daveConnection* dc, int area, int DB, int start, int len, void* buffer)

Read len bytes from the PLC.

Manifest constants

daveCounter200
enum daveCounter200;

S7 timers

daveDI
enum daveDI;

Data blocks

daveLocal
enum daveLocal;

Instance data blocks

daveSpeed9k
enum daveSpeed9k;

ProfiBus/MPI speed constants to be used with newInterface

daveTimer
enum daveTimer;

S7 counters

Structs

_daveConnection
struct _daveConnection

A structure representing the physical connection to a single PLC. daveConnection stores all properties that are unique to a single PLC: - The MPI address of this PLC. - The rack the PLC is in. - The slot the PLC is in.

_daveInterface
struct _daveInterface

A structure representing the physical connection to a PLC or a network of PLCs (e.g. like MPI). daveInterface stores all those properties that are common to a network of PLCs: - The local address used by your computer. - The speed used in this network. - The protocol type used in this network. - A name which is used when printing out debug messages. * The structure daveInterface is created and initialized by daveNewInterface: *

Meta