ByteBuffer.Equals (METH) ¶ METHOD Equals : BOOL ByteBuffer content is equal to other ByteBuffer. InOut: Scope Name Type Return Equals BOOL Inout other ByteBuffer
SubmoduleConfiguration (STRUCT) ¶ TYPE SubmoduleConfiguration : STRUCT Ident-Data and description of IO-Data of a Profinet submodule. InOut: Name Type Initial Comment API UDINT The application process identifier of the submodule. Slot UINT The slot number of the submodule. Subslot UINT The subslot number of the submodule. ModuleIdentNumber UDINT Module Identification number SubmoduleIdentNumber UDINT Submodule Identification number InputDataLen UINT 0 Lenght of Input Data (Input Data := data transmitted from field device’s inputs –> host applicatiom) OutputDataLen UINT 0 Lenght of Output Data (Output Data = data transmitted from host application –> field device’s outputs)
ProfinetDeviceInstance (FB) ¶ FUNCTION_BLOCK ProfinetDeviceInstance An instance of this function block represents a Profinet field device. The internal protocol stack has to be configured with DeviceIdentification and module configuration (method ConfigureDevice() or ReconfigureModules()). For operation, a cyclic call of methods ReceiveData() and SendData() is required. Additionally acyclic service requests have to be processed by cyclic call of method ProcessServices(). A sample project can be found on CODESYS forge. InOut: Scope Name Type Initial Comment Output DeviceID DWORD CommFB.Constants.INVALID_ID Device ID for usage in Profinet service function blocks (e.g. ProfinetCommon.DeviceAR, ProfinetCommon.SubmoduleIterator, CommFB.SUBSLOT_ID …) interfaceName WSTRING(255) Configured name of ethernet interface deviceIdent DeviceIdentification Configured identification data xInit BOOL Function block is initialized with all required paramters (methods ConfigureDevice() and ConfigureModules() xStartup BOOL Protocol stack is in startup phase xOnline BOOL Profinet device is online IPActive BOOL IP Stack is operating (valid IP-Address assigned) xError BOOL Any error occured (Details see output DeviceStatus) DeviceStatus Profinet.DeviceState Profinet.DeviceState.NotInit Current Status of the Device. StationName STRING(240) Currently active Stationname IPParameter ProfinetCommon.IPParameterValue Currently active IP-Address NumPorts DINT Number of configured / active ethernet ports (for this device instance) PortStatus ARRAY [0..7] OF PortStatus Current status of Ethernet ports EthernetStatistic InterfaceEthernetStatistic Ethernet Statistics Methods: ProcessServices ReceiveData Reset SendData Start ConfigureDevice ConfigureStartupParameters Plug UnPlug Structure: Config ConfigureDevice (Method) ConfigureStartupParameters (Method) Plug (Method) UnPlug (Method) ProcessServices (Method) ReceiveData (Method) Reset (Method) SendData (Method) Start (Method)
Config ¶ ConfigureDevice (Method) ConfigureStartupParameters (Method) Plug (Method) UnPlug (Method)
ProfinetDeviceInstance.ConfigureDevice (METH) ¶ METHOD ConfigureDevice : ErrorCode Configure name of ethernet interface to be used and die device’s Identification data. InOut: Scope Name Type Comment Return ConfigureDevice ErrorCode Input interfaceName WSTRING(255) Name of ethernet interface deviceID DeviceIdentification Identification data
ProfinetDeviceInstance.ConfigureStartupParameters (METH) ¶ METHOD ConfigureStartupParameters Configure stationname and IP-Address that the Profinet Device shall use at startup (instead of remanent data !). The usage of this function is only optional (e.g. during development phase)! The required behavior according to the specification is to use the last values that have been set by the Profinet controller and have been stored in remanent data. InOut: Scope Name Type Comment Input stationName STRING(240) Stationname that is used after startup of the Profinet Device. IPParams ProfinetCommon.IPParameterValue IP-Settings that are used after startup of the Profinet Device.
ProfinetDeviceInstance.Plug (METH) ¶ METHOD Plug : ErrorCode Add (Plug) a submodule to the module list of the Profinet Device. This method can also be executed after the initial connect-ind. (e.g. adapt to expected submodules, see |ProfinetCommon.DeviceAR| function block). InOut: Scope Name Type Return Plug ErrorCode Inout pnSubmodule ProfinetSubmodule
ProfinetDeviceInstance.UnPlug (METH) ¶ METHOD UnPlug : ErrorCode Remove( Un-Plug) a submodule from the module list of the Profinet Device. This method can also be executed after the initial connect-ind. (e.g. adapt to expected submodules, see |ProfinetCommon.DeviceAR| function block). InOut: Scope Name Type Comment Return UnPlug ErrorCode Inout Slot UINT The slot number of the diagnosis source. Subslot UINT The subslot number of the diagnosis source.
ProfinetDeviceInstance.ProcessServices (METH) ¶ METHOD ProcessServices : ErrorCode Process the services of the Profinet Device protocol machine (manage communication objects and acyclic servcies, conection handling, diagnosis). This method has to be called by the device application continiously (non real time context). A recommended interval is 10 ms, in the context of low-medium priority task. InOut: Scope Name Type Return ProcessServices ErrorCode
ProfinetDeviceInstance.ReceiveData (METH) ¶ METHOD ReceiveData : ErrorCode Receive data from the network. This method has to be called by the device application continiously (real time context!). InOut: Scope Name Type Return ReceiveData ErrorCode