SncDeviceDriverBase.InitOnDownload (METH) ¶ METHOD InitOnDownload : UDINT Method to register the initialization callback to EVT_BeforeWritingOutputs. If this event is posted the address of the F-SPS is set correctly and the corresponding device driver can be initialized. InOut: Scope Name Type Comment Return InitOnDownload UDINT Input wModuleType UINT module type dwInstance UDINT instance of the device pConnector POINTER TO IoConfigConnector pointer to the IO config connector
SncDeviceDriverBase.Initialize (METH) ¶ METHOD Initialize : ERROR Method to initialize the corresponding device driver to a given F-SPS and to register it to the global service provicder. If not done yet the global service provider is initialized, too. By initializing the service provider its linked SNC service handler is registered to the RTS service handler. Error return values: ERROR.ERR_OK -> success ERROR.ERR_NO_SERVICE_PROVIDER -> the given service provider is invalid (null pointer) ERROR.ERR_START_SERVICE_PROVIDER -> the given service provider could not be started because the registering of the SNC service handler to the RTS service handler failed ERROR.ERR_DRIVER_INVALID -> this driver is invalid for registering ERROR.DRIVER_IS_ALREADY_REGISTERED -> this driver is already registered to the given service provider InOut: Scope Name Type Comment Input dwVendorID DWORD vendor ID from the device description dwFSpsAddress DWORD address from the device description wMasterIdx WORD index of first master Return Initialize ERROR
SncDeviceDriverBase.ScanDeviceSpecificFSps (METH) ¶ METHOD ScanDeviceSpecificFSps : ERROR Method to check if a specific F-SPS physically exists and to synchronize the buffer size of CODESYS / Std-SPS with the F-SPS It should be implemented by derived FB InOut: Scope Name Type Comment Input eFSpsBusId FSPSBUSDRV F-SPS bus driver ID hWriter RTS_IEC_HANDLE writer for the reply udiStdSpsBufferSize UDINT size of the communication buffer of the standard SPS Return ScanDeviceSpecificFSps ERROR
SncDeviceDriverBase.SyncdWriterSize (PROP) ¶ PROPERTY SyncdWriterSize : UDINT Property of type ‘UDINT’ to save the size of the writer which is set by the standard RTS. This size is used to synchronize with the F-SPS because there is no writer’s inteface yet to get the size
SncDevDesc (FB) ¶ FUNCTION_BLOCK FINAL SncDevDesc IMPLEMENTS ISncDevDesc Base class for a device description of a F-SPS which is addressed by SNC services Properties: FSpsAddress FSpsDevAddress FSpsMasterIdx FSpsVendorID Structure: FSpsAddress (Property) FSpsDevAddress (Property) FSpsMasterIdx (Property) FSpsVendorID (Property)
04 Comm Drivers ¶ This folder provides the function blocks for various communication drivers ( block drivers) based on EtherCAT or SharedMemory communication. BlkDriver Stuff EtherCAT based CommDriver SHM based CommDriver
BlkDriver Stuff ¶ This folder provides function blocks implenting a block driver based on EtherCAT or SharedMemory communication drivers.
EtherCAT based CommDriver ¶ This folder provides function blocks implenting an EtherCAT communication driver based on the VendorOverEtherCAT interface for reading / writing data
SHM based CommDriver ¶ This folder provides function blocks implenting a SharedMemory communication driver for reading / writing data
05 ServiceHandler ¶ This folder provides the function block for the SNC service handler which is registered at the RTS service handler and which handles the incoming SNC service requests for the various F-SPS.