Inherits IDispatch.
Classes | |
struct | IoDiagnosis |
struct | IoFieldbusMasterInfo |
struct | IoFieldbusSlaveInfo |
struct | IoHandle |
Public Types |
Public Member Functions | |
HRESULT | ReadFieldbusMasterInfo ([out, retval] struct IoFieldbusMasterInfo *masterInfo) |
HRESULT | UpdateFieldbusIo () |
HRESULT | ReadFieldbusSlaveInfos ([out, retval] SAFEARRAY(struct IoFieldbusSlaveInfo)*slaveInfos) |
HRESULT | WriteFieldbusIoAsByteArray ([in] BSTR slaveAddress, [in] IoFieldbusArea area, [in] LONG byteOffset, [in] LONG byteLength, [in] SAFEARRAY(BYTE) data) |
HRESULT | ReadFieldbusIoAsByteArray ([in] BSTR slaveAddress, [in] IoFieldbusArea area, [in] LONG byteOffset, [in] LONG byteLength, [out, retval] SAFEARRAY(BYTE)*data) |
Definition of the IFieldbus interface which gives access to the data of a single fieldbus.
The IIo interface contains various methods of accessing different input and output subsystems of the mlpi target. It makes it possible to read and write data from the connected fieldbus hardware.
Definition at line 72 of file IFieldbus.idl.
This enumeration defines types of fieldbus master.
Definition at line 76 of file IFieldbus.idl.
This enumeration defines the I/O areas 'Input' and 'Output' of a fieldbus device.
Enumerator | |
---|---|
IO_AREA_INPUT |
Input area of a fieldbus device. |
IO_AREA_OUTPUT |
Output area of a fieldbus device. |
Definition at line 92 of file IFieldbus.idl.
HRESULT IFieldbus::ReadFieldbusMasterInfo | ( | [out, retval] struct IoFieldbusMasterInfo * | masterInfo | ) |
This function returns miscellaneous information about the given master. This includes its name, diagnosis, type, number of slaves, etc...
[out] | masterInfo | Returns a struct with miscellaneous information about the given master. |
mlpiIoReadFieldbusMasterInfo
, where you can find further documentation. HRESULT IFieldbus::UpdateFieldbusIo | ( | ) |
This method performs a bus cycle in order to update the fieldbus I/Os of all attached slaves of the fieldbus.
mlpiIoUpdateFieldbusIo
, where you can find further documentation. HRESULT IFieldbus::ReadFieldbusSlaveInfos | ( | [out, retval] SAFEARRAY(struct IoFieldbusSlaveInfo)* | slaveInfos | ) |
This function returns an array with information about the slaves connected to this fieldbus. This includes their names, diagnoses, types, etc...
[out] | slaveInfos | Returns an array of structs. Each array element holds information about a slave. |
mlpiIoReadFieldbusSlaveInfo
, where you can find further documentation. HRESULT IFieldbus::WriteFieldbusIoAsByteArray | ( | [in] BSTR | slaveAddress, |
[in] IoFieldbusArea | area, | ||
[in] LONG | byteOffset, | ||
[in] LONG | byteLength, | ||
[in] SAFEARRAY(BYTE) | data | ||
) |
This function writes a byte array to the fieldbus slave.
[in] | slaveAddress | Name or address of the slave to access. |
[in] | area | Area to access (IO_AREA_INPUT, IO_AREA_OUTPUT). |
[in] | byteOffset | Byte offset based on zero (e.g. IB0). |
[in] | byteLength | Number of bytes to write from data array to the memory area. |
[in] | data | Input data array of bytes to be written to the given area at given byteOffset. Array has to be greater than or equal to byteLength . |
mlpiIoWriteFieldbusIo
, where you can find further documentation. HRESULT IFieldbus::ReadFieldbusIoAsByteArray | ( | [in] BSTR | slaveAddress, |
[in] IoFieldbusArea | area, | ||
[in] LONG | byteOffset, | ||
[in] LONG | byteLength, | ||
[out, retval] SAFEARRAY(BYTE)* | data | ||
) |
This function reads a byte array from the fieldbus slave.
[in] | slaveAddress | Name or address of the slave to access. |
[in] | area | Memory area to access (IO_AREA_INPUT, IO_AREA_OUTPUT). |
[in] | byteOffset | Byte offset based on zero. |
[in] | byteLength | Number of bytes to read from area. |
[out] | data | Returns an array of bytes containing the requested memory area. Index starts at 0. |
mlpiIoReadFieldbusIo
, where you can find further documentation.