Open Core Interface - MLPI
MLPI-MotionLogicProgrammingInterface(mlpi4Java)  1.26.2
com.boschrexroth.mlpi.Fieldbus Class Reference

Inherits com.boschrexroth.mlpi.MlpiComponent.

Collaboration diagram for com.boschrexroth.mlpi.Fieldbus:
Collaboration graph

Public Member Functions

String getNameOfFieldbus ()
 
native Io.IoFieldbusMasterInfo readFieldbusMasterInfo ()
 
native void updateFieldbusIo ()
 
native Io.IoFieldbusSlaveInfo[] readFieldbusSlaveInfos ()
 
native void writeFieldbusIoAsByteArray (String slaveAddress, Io.IoFieldbusArea area, int byteOffset, int byteLength, byte[] data)
 
native byte[] readFieldbusIoAsByteArray (String slaveAddress, Io.IoFieldbusArea area, int byteOffset, int byteLength)
 

Detailed Description

Class definition for fieldbusses.

Definition at line 63 of file Fieldbus.java.

Member Function Documentation

String com.boschrexroth.mlpi.Fieldbus.getNameOfFieldbus ( )
inline

This method returns the name of the fieldbus.

Returns
The name of the fieldbus.
Example Java:
//read masterlist and print each fieldbus name to output
String[] masterList = connection.io().readFieldbusMasterList();
for (String master: masterList)
{
java.lang.System.out.println("-> " + connection.io().fieldbusses(master).getNameOfFieldbus());
}

Definition at line 90 of file Fieldbus.java.

References com.boschrexroth.mlpi.Fieldbus.readFieldbusIoAsByteArray(), com.boschrexroth.mlpi.Fieldbus.readFieldbusMasterInfo(), com.boschrexroth.mlpi.Fieldbus.readFieldbusSlaveInfos(), com.boschrexroth.mlpi.Fieldbus.updateFieldbusIo(), and com.boschrexroth.mlpi.Fieldbus.writeFieldbusIoAsByteArray().

Here is the call graph for this function:

native Io.IoFieldbusMasterInfo com.boschrexroth.mlpi.Fieldbus.readFieldbusMasterInfo ( )

This method reads information about the fieldbus master.

Returns
Information about the fieldbus master.
Example Java:
//read masterlist and print each master including detailed information to output
String[] masterList = connection.io().readFieldbusMasterList();
for (String master: masterList)
{
// read more detailed information about the master
IoFieldbusMasterInfo info = connection.io().fieldbusses(master).readFieldbusMasterInfo();
java.lang.System.out.println("-> " + master);
java.lang.System.out.println(" Name: " + info.name);
java.lang.System.out.println(" NumSlaves: " + info.numberOfSlaves);
java.lang.System.out.println(" Type: " + info.type.toString());
java.lang.System.out.println(String.format(" Diagnosis: 0x%08X", info.diagnosis.flags));
}
Note:
This method maps to the mlpiCore function mlpiIoReadFieldbusMasterInfo, where you can find further documentation.

Referenced by com.boschrexroth.mlpi.Fieldbus.getNameOfFieldbus().

Here is the caller graph for this function:

native void com.boschrexroth.mlpi.Fieldbus.updateFieldbusIo ( )

This method performs a bus cycle in order to update the fieldbus I/Os of all attached slaves of the fieldbus.

Example Java:
connection.io().fieldbusses("Profibus_DP_Master").updateFieldbusIo();
Note:
This method maps to the mlpiCore function mlpiIoUpdateFieldbusIo, where you can find further documentation.

Referenced by com.boschrexroth.mlpi.Fieldbus.getNameOfFieldbus().

Here is the caller graph for this function:

native Io.IoFieldbusSlaveInfo [] com.boschrexroth.mlpi.Fieldbus.readFieldbusSlaveInfos ( )

This method reads information about the fieldbus slaves of a fieldbus master.

Returns
Information about the fieldbus slaves.
Example Java:
String[] masterList = connection.io().readFieldbusMasterList();
for (String master: masterList)
{
// read more detailed information about the master
IoFieldbusMasterInfo masterInfo = connection.io().fieldbusses(master).readFieldbusMasterInfo();
java.lang.System.out.println("-> " + master);
java.lang.System.out.println(" Name: " + masterInfo.name);
java.lang.System.out.println(" NumSlaves: " + masterInfo.numberOfSlaves);
java.lang.System.out.println(" Type: " + masterInfo.type.toString());
java.lang.System.out.println(String.format(" Diagnosis: 0x%08X", masterInfo.diagnosis.flags));
// read more detailed information about each connected slave
IoFieldbusSlaveInfo[] slaveList = connection.io().fieldbusses(master).readFieldbusSlaveInfos();
for (IoFieldbusSlaveInfo slave: slaveList)
{
java.lang.System.out.println(" -> " + slave.name);
java.lang.System.out.println(" Name: " + slave.name);
java.lang.System.out.println(" Address: " + slave.address);
java.lang.System.out.println(String.format(" Diagnosis: 0x%08X", slave.diagnosis.flags));
java.lang.System.out.println(" NumInputs: " + slave.numberOfInputs);
java.lang.System.out.println(" NumOutputs: " + slave.numberOfOutputs);
}
}
Note:
This method maps to the mlpiCore function mlpiIoReadFieldbusSlaveInfos, where you can find further documentation.

Referenced by com.boschrexroth.mlpi.Fieldbus.getNameOfFieldbus().

Here is the caller graph for this function:

native void com.boschrexroth.mlpi.Fieldbus.writeFieldbusIoAsByteArray ( String  slaveAddress,
Io.IoFieldbusArea  area,
int  byteOffset,
int  byteLength,
byte[]  data 
)

This method writes a byte array to the fieldbus slave.

Parameters
[in]slaveAddressName or address of the slave to access.
[in]areaArea to access (Io.IoFieldbusArea).
[in]byteOffsetByte offset based on zero.
[in]byteLengthNumber of bytes to write from data array to the memory area.
[in]dataInput data array of bytes to be written to the given area at given byteOffset. Array has to be greater than or equal to byteLength.
Example Java:
Note:
This method maps to the mlpiCore function mlpiIoWriteFieldbusIoArrayUchar, where you can find further documentation.

Referenced by com.boschrexroth.mlpi.Fieldbus.getNameOfFieldbus().

Here is the caller graph for this function:

native byte [] com.boschrexroth.mlpi.Fieldbus.readFieldbusIoAsByteArray ( String  slaveAddress,
Io.IoFieldbusArea  area,
int  byteOffset,
int  byteLength 
)

This method reads a byte array from the fieldbus slave.

Returns
bytearray
Parameters
[in]slaveAddressName or address of the slave to access.
[in]areaArea to access (Io.IoFieldbusArea).
[in]byteOffsetByte offset based on zero.
[in]byteLengthNumber of bytes to read from the memory area.
Note:
This method maps to the mlpiCore function mlpiIoReadFieldbusIoArrayUchar, where you can find further documentation.

Referenced by com.boschrexroth.mlpi.Fieldbus.getNameOfFieldbus().

Here is the caller graph for this function:


The documentation for this class was generated from the following file: