ERROR (ENUM) ¶ TYPE ERROR : Enumeration for the various error types in the subnode communication manager (SNCM): Attributes: qualified_only InOut: Name Initial Comment ERR_OK 0 The action was successful. ERR_FAILED 1 The action failed due to a non specific reason. ERR_ADDRESS_INVALID 2 The given F-SPS bus address or F-SPS device address is not valid. ERR_SERVICEPROVIDER_NOTINITIALIZED 3 The SNC service provider was not fully initialized yet. ERR_SERVICEPROVIDER_START 4 The SNC service handler could not be registered at the RTS service handler and therefore not started. ERR_DRIVER_INVALID 5 The given F-SPS bus driver could not be registered in the SNC service provider because of an invalid driver handle. ERR_DRIVER_ALREADYREGISTERED 6 The given F-SPS bus driver is already registered in the SNC service provider. ERR_DRIVER_MISMATCH 7 The given service is forwarded to the wrong F-SPS bus driver. ERR_BUSHANDLER_NOTINITIALIZED 8 The underlying bus handler was not fully initialized yet. ERR_READER_FAILED 9 Error while reading the service ERR_WRITER_FAILED 10 Error while writing the reply ERR_COMM_NOTOPEN 11 The communication channel to the F-SPS could not be opened. ERR_FSPS_SVC2BIG 12 The transferred safety service is larger than the F-SPS message buffer ERR_FSPS_SEND 13 Common error during sending the safety service data ERR_FSPS_SENDTIMEOUT 14 Timeout during sending the safety service data (block timeout) ERR_FSPS_SENDANDREOPEN 15 The sending of the safety service data is pending and the reopen of the channel failed ERR_FSPS_REPLY 16 Common error while receiving the safety service reply ERR_FSPS_REPLYTIMEOUT 17 Timeout during reply (block timeout and message timeout) ERR_FSPS_STATE 18 Undefined state in the communication loop of the bus handler ERR_FSPS_PENDING 19 The F-SPS is busy and couldn’t handle the service reply in time (access to flash, …) ERR_SCAN_FAILED 20 Common error in scan ERR_SCAN_TIMEOUT 21 Timeout during scan
FSPSBUSDRV (ENUM) ¶ TYPE FSPSBUSDRV : Enumeration for the various F-SPS bus driver types in the subnode communication manager: Attributes: qualified_only InOut: Name Initial Comment ETHERCAT 16#1 Bus driver is of type ‘ETHERCAT’ SINGLE_SHM 16#2 Bus driver is of type ‘Single FSps’ on base of a shared memory communication
LOGDBGSTATE (ENUM) ¶ TYPE LOGDBGSTATE : Enumeration for the various states of the SNC device driver as an alternative if there are no debugging / logging possibilities Attributes: qualified_only InOut: Name Initial Comment DBG_INITDOWNLOAD_ENTRY 0 entered InitOnDownload() method which is called by the device itself DBG_INITDOWNLOAD_NULLCONNECTOR 1 InitOnDownload() has a null connector as parameter DBG_INITDOWNLOAD_NULLCBEVENT 2 InitOnDownload() cannot register for EVT_BeforeWritingOutputs DBG_INITDOWNLOAD_CALLBACK 3 InitOnDownload() could register a callback for EVT_BeforeWritingOutputs DBG_INITEVTCB_ALREADYDONE 4 the initialization by the event callback is called twice DBG_INITEVTCB_NOIDENTITY 5 could not read the identity of the EtherCAT slave in the event callback DBG_INITEVTCB_NOSLAVEADDR 6 could not read the physical address of the EtherCAT slave in the event callback DBG_INITEVTCB_NOVENDORID 7 could not read the vendor ID of the EtherCAT slave in the event callback DBG_INITEVTCB_NOMASTERIDX 8 could not get master index of the EtherCAT slave in the event callback DBG_INITEVTCB_NOSLAVE 9 could not get the slave out of the parameter structure in the event callback DBG_INITEVTCB_NOTINOPSTATE 10 the slave is not in the operate state in the event callback DBG_INITEVTCB_NOTMYBUSINESS 11 the event callback was called although is was not the right IEC task or event DBG_INITDEV_ALREADYDONE 12 the initialization of the SNC device driver for this F-SPS is called twice DBG_INITDEV_INVALIDADDRESS 13 could not initialize the SNC device driver for this F-SPS because vendorID and address are 0 DBG_INITSRVPRV_FAILED 14 could not initialize the corresponding SNC service provider for this F-SPS DBG_INITSRVPRV_SUCCESS 15 successfully initialized the corresponding SNC service provider for this F-SPS DBG_INITDEVDESC_FAILED 16 could not initialize the corresponding SNC device description for this F-SPS DBG_INITDEVDESC_SUCCESS 17 successfully initialized the corresponding SNC device description for this F-SPS DBG_REGDEVDESC_FAILED 18 could not register this F-SPS to the SNC service provider DBG_REGDEVDESC_SUCCESS 19 successfully registered this F-SPS to the SNC service provider DBG_INITDEVSPEC_FAILED 20 could not initialize the bus specific part of the F-SPS DBG_INITDEVSPEC_SUCCESS 21 successfully initialized the bus specific part for this F-SPS
Function Blocks ¶ 01 Snc Base FB SncDeviceDriverBase (FunctionBlock) FSpsBusID (Property) FSpsDeviceAddress (Property) InitDeviceSpecificFSps (Method) InitOnDownload (Method) Initialize (Method) ScanDeviceSpecificFSps (Method) SyncdWriterSize (Property) TransmitDeviceSpecificData (Method) WasInitialized (Property) WriteScanReply (Method) 02 Device Drivers and Bus Datahandlers Bushandler EtherCAT DEVDRV_ETC (GVL) SncEtherCATDriver (FunctionBlock) BlockTimeoutMs (Property) BlockTimeoutMultiplier (Property) CommBufferSize (Property) CommTimeout (Property) FSpsBusID (Property) InitDeviceSpecificFSps (Method) MsgTimeoutMs (Property) ScanDeviceSpecificFSps (Method) ScanTimeoutMs (Property) Single FSps SncSingleDevDriver (FunctionBlock) BlockTimeoutMs (Property) CommBufferSize (Property) FSpsBusID (Property) InitDeviceSpecificFSps (Method) MsgTimeoutMs (Property) ScanDeviceSpecificFSps (Method) 03 Device Description SncDevDesc (FunctionBlock) FSpsAddress (Property) FSpsDevAddress (Property) FSpsMasterIdx (Property) FSpsVendorID (Property) 04 Comm Drivers BlkDriver Stuff EtherCAT based CommDriver SHM based CommDriver 05 ServiceHandler 06 ServiceProvider SncServiceProvider (FunctionBlock) NumOfHandledServices (Property) SimulateServiceRequest (Method) 07 Logger
01 Snc Base FB ¶ This folder provides the basic function blocks for the subnode communication manager: “SncBusHandlerBase”: transmits the content of a SNC service to a specific F-SPS on base of its bus dependent communication driver (EtherCAT or SharedMemory) “SncCommDriverBase”: implements a certain communication driver (open / close comm, send, receive, …) “SncDeviceDriverBase”: represents one F-SPS which is registered at the “SNCServiceProvider” to handle SNC services “SncFSpsServiceProviderBase”: combines the SNC service handler with the registered F-SPS; registers the SNC service handler at the RTS service handler SncDeviceDriverBase (FunctionBlock) FSpsBusID (Property) FSpsDeviceAddress (Property) InitDeviceSpecificFSps (Method) InitOnDownload (Method) Initialize (Method) ScanDeviceSpecificFSps (Method) SyncdWriterSize (Property) TransmitDeviceSpecificData (Method) WasInitialized (Property) WriteScanReply (Method)
SncDeviceDriverBase (FB) ¶ FUNCTION_BLOCK SncDeviceDriverBase IMPLEMENTS ISncDeviceDriver, ICmpEventCallback Base class for a F-SPS device driver for handling the SNC services addressed to its connected F-SPS implements the interface ‘ISncDeviceDriver’ registers a given F-SPS to the SncServiceProvider handles the SNC service data on base of the bus specific communication (EtherCAT or SharedMemory) Properties: FSpsBusID FSpsDeviceAddress SyncdWriterSize WasInitialized Methods: InitDeviceSpecificFSps InitOnDownload Initialize ScanDeviceSpecificFSps TransmitDeviceSpecificData WriteScanReply Structure: FSpsBusID (Property) FSpsDeviceAddress (Property) InitDeviceSpecificFSps (Method) InitOnDownload (Method) Initialize (Method) ScanDeviceSpecificFSps (Method) SyncdWriterSize (Property) TransmitDeviceSpecificData (Method) WasInitialized (Property) WriteScanReply (Method)
02 Device Drivers and Bus Datahandlers ¶ This folder provides the function blocks to handle SNC service data over various bus driver types (EtherCAT, SharedMemory) and contains further function blocks of the corresponding F-SPS device drivers. Bushandler EtherCAT DEVDRV_ETC (GVL) SncEtherCATDriver (FunctionBlock) BlockTimeoutMs (Property) BlockTimeoutMultiplier (Property) CommBufferSize (Property) CommTimeout (Property) FSpsBusID (Property) InitDeviceSpecificFSps (Method) MsgTimeoutMs (Property) ScanDeviceSpecificFSps (Method) ScanTimeoutMs (Property) Single FSps SncSingleDevDriver (FunctionBlock) BlockTimeoutMs (Property) CommBufferSize (Property) FSpsBusID (Property) InitDeviceSpecificFSps (Method) MsgTimeoutMs (Property) ScanDeviceSpecificFSps (Method)
Bushandler ¶ This folder provides the function blocks to handle SNC service data over various bus driver types to a specific F-SPS
EtherCAT ¶ This folder provides the function blocks for a SNC EtherCAT device driver which represents a F-SPS being an EtherCAT slave. DEVDRV_ETC (GVL) SncEtherCATDriver (FunctionBlock) BlockTimeoutMs (Property) BlockTimeoutMultiplier (Property) CommBufferSize (Property) CommTimeout (Property) FSpsBusID (Property) InitDeviceSpecificFSps (Method) MsgTimeoutMs (Property) ScanDeviceSpecificFSps (Method) ScanTimeoutMs (Property)
Single FSps ¶ This folder provides the function blocks for a SNC single F-SPS device driver which represents a F-SPS communicating via SharedMemory with the Std-SPS. There can only be one of this type. SncSingleDevDriver (FunctionBlock) BlockTimeoutMs (Property) CommBufferSize (Property) FSpsBusID (Property) InitDeviceSpecificFSps (Method) MsgTimeoutMs (Property) ScanDeviceSpecificFSps (Method)