IoT::S7PLC

class S7PLCClient

File Information

Library: IoT/S7PLC
Package: S7PLCClient
Header: IoT/S7PLC/S7PLCClient.h

Description

Step7 PLC Client Interface.

Member Summary

Member Functions: abRead, abWrite, address, coldStart, connect, connected, dbRead, dbWrite, disconnect, ebRead, ebWrite, getCPUInfo, getDateTime, getOrderInfo, getStatus, hotStart, listBlocks, mbRead, mbWrite, rack, readByte, readDInt, readDWord, readFloat, readInt, readVariables, readWord, slot, stop, writeByte, writeDInt, writeDWord, writeFloat, writeInt, writeWord

Types

Ptr

typedef Poco::SharedPtr < S7PLCClient > Ptr;

Constructors

S7PLCClient

S7PLCClient();

Creates the S7PLCClient.

Destructor

~S7PLCClient virtual

virtual ~S7PLCClient();

Destroys the S7PLCClient.

Member Functions

abRead virtual

virtual std::vector < char > abRead(
    int start,
    int size
) = 0;

Performs a AB ("Ausgang"/output, bytewise) read operation.

abWrite virtual

virtual void abWrite(
    int start,
    const std::vector < char > & data
) = 0;

Performs a AB ("Ausgang"/output, bytewise) write operation.

address virtual

virtual std::string address() const = 0;

Returns the PLC address.

coldStart virtual

virtual void coldStart() = 0;

Performs a cold start.

connect virtual

virtual void connect() = 0;

Connects to the PLC.

connected virtual

virtual bool connected() const = 0;

Returns true if the client is connected to the PLC, otherwise false.

dbRead virtual

virtual std::vector < char > dbRead(
    int dbNumber,
    int start,
    int size
) = 0;

Performs a DB ("Datenbaustein"/data block, bytewise) read operation.

dbWrite virtual

virtual void dbWrite(
    int dbNumber,
    int start,
    const std::vector < char > & data
) = 0;

Performs a DB ("Datenbaustein"/data block, bytewise) write operation.

disconnect virtual

virtual void disconnect() = 0;

Disconnects from the PLC.

ebRead virtual

virtual std::vector < char > ebRead(
    int start,
    int size
) = 0;

Performs a EB ("Eingang"/input, bytewise) read operation.

ebWrite virtual

virtual void ebWrite(
    int start,
    const std::vector < char > & data
) = 0;

Performs a EB ("Eingang"/input, bytewise) write operation.

getCPUInfo virtual

virtual CPUInfo getCPUInfo() = 0;

Returns CPU information.

getDateTime virtual

virtual Poco::DateTime getDateTime() = 0;

Returns the PLC's date and time.

getOrderInfo virtual

virtual OrderInfo getOrderInfo() = 0;

Returns order code and version information.

getStatus virtual

virtual PLCStatus getStatus() = 0;

Returns the PLC status.

hotStart virtual

virtual void hotStart() = 0;

Performs a hot start.

listBlocks virtual

virtual BlockInfo listBlocks() = 0;

Returns information about available blocks.

mbRead virtual

virtual std::vector < char > mbRead(
    int start,
    int size
) = 0;

Performs a MB ("Merker"/mnemonic, bytewise) read operation.

mbWrite virtual

virtual void mbWrite(
    int start,
    const std::vector < char > & data
) = 0;

Performs a MB ("Merker"/mnemonic, bytewise) write operation.

rack virtual

virtual int rack() const = 0;

Returns the PLC rack number.

readByte virtual

virtual Poco::UInt8 readByte(
    int dbNumber,
    int address
) = 0;

Reads a single byte from a data block.

readDInt virtual

virtual Poco::Int32 readDInt(
    int dbNumber,
    int address
) = 0;

Reads a single 32-bit integer from a data block.

readDWord virtual

virtual Poco::UInt32 readDWord(
    int dbNumber,
    int address
) = 0;

Reads a single 32-bit double word from a data block.

readFloat virtual

virtual float readFloat(
    int dbNumber,
    int address
) = 0;

Reads a single 32-bit float from a data block.

readInt virtual

virtual Poco::Int16 readInt(
    int dbNumber,
    int address
) = 0;

Reads a single 16-bit integer from a data block.

readVariables virtual

virtual std::vector < double > readVariables(
    int dbNumber,
    const std::vector < VariableDescriptor > & descriptors
) = 0;

Reads multiple variables specified by descriptors and converts them to double values, optionally applying a scale (slope) and offset (intercept).

readWord virtual

virtual Poco::UInt16 readWord(
    int dbNumber,
    int address
) = 0;

Reads a single 16-bit word from a data block.

slot virtual

virtual int slot() const = 0;

Returns the PLC slot number.

stop virtual

virtual void stop() = 0;

Stops the PLC.

writeByte virtual

virtual void writeByte(
    int dbNumber,
    int address,
    Poco::UInt8 value
) = 0;

Writes a single byte to a data block.

writeDInt virtual

virtual void writeDInt(
    int dbNumber,
    int address,
    Poco::Int32 value
) = 0;

Writes a single 32-bit integer to a data block.

writeDWord virtual

virtual void writeDWord(
    int dbNumber,
    int address,
    Poco::UInt32 value
) = 0;

Writes a single 32-bit double word to a data block.

writeFloat virtual

virtual void writeFloat(
    int dbNumber,
    int address,
    float value
) = 0;

Writes a single 32-bit float to a data block.

writeInt virtual

virtual void writeInt(
    int dbNumber,
    int address,
    Poco::Int16 value
) = 0;

Writes a single 16-bit integer to a data block.

writeWord virtual

virtual void writeWord(
    int dbNumber,
    int address,
    Poco::UInt16 value
) = 0;

Writes a single 16-bit word to a data block.

Securely control IoT edge devices from anywhere   Connect a Device