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 ~S7PLCClient();
Destroys the S7PLCClient.
Member Functions
abRead
virtual std::vector < char > abRead(
int start,
int size
) = 0;
Performs a AB ("Ausgang"/output, bytewise) read operation.
abWrite
virtual void abWrite(
int start,
const std::vector < char > & data
) = 0;
Performs a AB ("Ausgang"/output, bytewise) write operation.
address
virtual std::string address() const = 0;
Returns the PLC address.
coldStart
virtual void coldStart() = 0;
Performs a cold start.
connect
virtual void connect() = 0;
Connects to the PLC.
connected
virtual bool connected() const = 0;
Returns true if the client is connected to the PLC, otherwise false.
dbRead
virtual std::vector < char > dbRead(
int dbNumber,
int start,
int size
) = 0;
Performs a DB ("Datenbaustein"/data block, bytewise) read operation.
dbWrite
virtual void dbWrite(
int dbNumber,
int start,
const std::vector < char > & data
) = 0;
Performs a DB ("Datenbaustein"/data block, bytewise) write operation.
disconnect
virtual void disconnect() = 0;
Disconnects from the PLC.
ebRead
virtual std::vector < char > ebRead(
int start,
int size
) = 0;
Performs a EB ("Eingang"/input, bytewise) read operation.
ebWrite
virtual void ebWrite(
int start,
const std::vector < char > & data
) = 0;
Performs a EB ("Eingang"/input, bytewise) write operation.
getCPUInfo
virtual CPUInfo getCPUInfo() = 0;
Returns CPU information.
getDateTime
virtual Poco::DateTime getDateTime() = 0;
Returns the PLC's date and time.
getOrderInfo
virtual OrderInfo getOrderInfo() = 0;
Returns order code and version information.
getStatus
virtual PLCStatus getStatus() = 0;
Returns the PLC status.
hotStart
virtual void hotStart() = 0;
Performs a hot start.
listBlocks
virtual BlockInfo listBlocks() = 0;
Returns information about available blocks.
mbRead
virtual std::vector < char > mbRead(
int start,
int size
) = 0;
Performs a MB ("Merker"/mnemonic, bytewise) read operation.
mbWrite
virtual void mbWrite(
int start,
const std::vector < char > & data
) = 0;
Performs a MB ("Merker"/mnemonic, bytewise) write operation.
rack
virtual int rack() const = 0;
Returns the PLC rack number.
readByte
virtual Poco::UInt8 readByte(
int dbNumber,
int address
) = 0;
Reads a single byte from a data block.
readDInt
virtual Poco::Int32 readDInt(
int dbNumber,
int address
) = 0;
Reads a single 32-bit integer from a data block.
readDWord
virtual Poco::UInt32 readDWord(
int dbNumber,
int address
) = 0;
Reads a single 32-bit double word from a data block.
readFloat
virtual float readFloat(
int dbNumber,
int address
) = 0;
Reads a single 32-bit float from a data block.
readInt
virtual Poco::Int16 readInt(
int dbNumber,
int address
) = 0;
Reads a single 16-bit integer from a data block.
readVariables
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 Poco::UInt16 readWord(
int dbNumber,
int address
) = 0;
Reads a single 16-bit word from a data block.
slot
virtual int slot() const = 0;
Returns the PLC slot number.
stop
virtual void stop() = 0;
Stops the PLC.
writeByte
virtual void writeByte(
int dbNumber,
int address,
Poco::UInt8 value
) = 0;
Writes a single byte to a data block.
writeDInt
virtual void writeDInt(
int dbNumber,
int address,
Poco::Int32 value
) = 0;
Writes a single 32-bit integer to a data block.
writeDWord
virtual void writeDWord(
int dbNumber,
int address,
Poco::UInt32 value
) = 0;
Writes a single 32-bit double word to a data block.
writeFloat
virtual void writeFloat(
int dbNumber,
int address,
float value
) = 0;
Writes a single 32-bit float to a data block.
writeInt
virtual void writeInt(
int dbNumber,
int address,
Poco::Int16 value
) = 0;
Writes a single 16-bit integer to a data block.
writeWord
virtual void writeWord(
int dbNumber,
int address,
Poco::UInt16 value
) = 0;
Writes a single 16-bit word to a data block.