ConnectorOptions (GVL) ¶ Connector options: Options to specify properties of a connector InOut: Scope Name Type Initial Comment Constant CO_NONE WORD 16#0 No option CO_SCAN_PENDING_SUPPORTED WORD 16#1 Scan the IO-configuration with segmented transfer is supported. In this case, the call of IoDrvScanModules() can return ERR_PENDING to get further calls to transmit more scan results.
ConnectorTypes (GVL) ¶ Types of connectors. “0x8000..0x8FFF” are Special Connectors InOut: Scope Name Type Initial Comment Constant CT_PROGRAMMABLE WORD 16#1000 Programmable connector (can be programmed by CoDeSys) CT_PARAMETRIZABLE WORD 16#2000 Connector is only parametrizable CT_CAN_BUS WORD 16#F CANbus CT_CAN_MASTER WORD 16#10 CANopen Master CT_CAN_SLAVE WORD 16#11 CANopen Local Device CT_CAN_DEVICE WORD 16#12 CANopen Remote Device CT_CANOPEN_SAFETY WORD 16#15 CANopen Safety CT_J1939_MANAGER WORD 16#18 J1939 Manager CT_J1939_ECU WORD 16#19 J1939 ECU CT_CANOPEN_SAFETY_SLAVE WORD 16#1A CANopen Safety Slave CT_PROFIBUS_MASTER WORD 16#20 Profibus Master CT_PROFIBUS_SLAVE WORD 16#21 Profibus Slave CT_PROFIBUS_DEVICE WORD 16#22 Profibus Device CT_PROFIBUS_MOD_MASTER WORD 16#23 Profibus modular Master CT_PROFIBUS_MOD_SLAVE WORD 16#24 Profibus modular Slave CT_DEVICENET_MASTER WORD 16#30 Profibus DeviceNet Master CT_DEVICENET_SLAVE WORD 16#31 Profibus DeviceNet Slave CT_DEVICENET_DEVICE WORD 16#32 DeviceNet Device CT_ETHERCAT_MASTER WORD 16#40 EtherCAT Master CT_ETHERCAT_SLAVE WORD 16#41 EtherCAT Slave CT_ETHERCAT_DEVICE WORD 16#42 EtherCAT Device CT_ENIP_SCANNER WORD 16#64 EtherNet/IP Scanner CT_ENIP_REMOTE_ADAPTER WORD 16#65 EtherNet/IP Remote Adapter CT_PCI_MASTER WORD 16#100 PCI Master CT_PCI_SLAVE WORD 16#101 PCI Slave
DriverPropertyFlags (GVL) ¶ InOut: Scope Name Type Initial Comment Constant DRVPROP_CONSISTENCY DWORD 16#1 IO-driver realizes bit-consistency by its own (atomar bit access). If this flag is 0, the bit-consistency is provided by the IO-Manager. DRVPROP_WATCHDOG DWORD 16#2 The io driver needs a cyclic call TO the IoDrvWatchdogTrigger INTERFACE FUNCTION. The io manager will call the io driver approximately every Watchdogtime/2. The Watchdogtime must be set in the IoConfig parameters (ID 0x70000001). ATTENTION: The io manager will pass a NULL pointer as parameter pConnector to the IIoDrv interface function IoDrvWatchdogTrigger. If this flag is 0, the driver must trigger the watchdog itself. DRVPROP_REDUNDANCY DWORD 16#4 IO-driver can support redundancy. If the flag DRVPROP_REDUNDANCY is 1, the redundancy is provided by the IO-Manager. DRVPROP_ACTIVE DWORD 16#8 If the flag DRVPROP_ACTIVE is 1, the master is active otherwise passive. DRVPROP_ERROR_ACTIVE DWORD 16#10 The flag DRVPROP_ERROR_ACTIVE is used to tell the redundancy component that the active master has an error and it should switchover (only on active plc). DRVPROP_ERROR_PASSIVE DWORD 16#20 The flag DRVPROP_ERROR_PASSIVE can be set to inform redundancy component that the communication was lost. DRVPROP_BACKGROUND_GETDIAG DWORD 16#40 If this property is set, the interface function IoDrvGetModuleDiagnosis() of the driver is called cyclically from a background task. NOTE: In this case, IoDrvGetModuleDiagnosis is called with: IoDrvGetModuleDiagnosis(hIoDrv, NULL); This must be handled correctly in the IO-driver! DRVPROP_NO_SYNC DWORD 16#80 Disable synchronization for ReadInputs/WriteOutputs/StartBusCycle in the I/O Manager (CmpIoMgr). In this case the I/O driver has to implement the synchronization of these functions itself. CmpIoMgr provides the following functions that can be used by the I/O driver for synchronization: IoMgrLockEnter(), IoMgrLockLeave()
IoConfigChannelMap (STRUCT) ¶ TYPE IoConfigChannelMap : STRUCT Mapping information for a single channel. Every I/O-channel is described as a parameter, but with special meanings. The datatype of a channel can be simple (BOOL, BYTE, WORD, etc.) or array of simple types. InOut: Name Type Comment pParameter POINTER TO IoConfigParameter Pointer to the parameter description. pbyIecAddress POINTER TO BYTE Pointer to the parameter in the process image on the IEC side. wParameterBitOffset WORD Bitoffset of the device. wIecAddressBitOffset WORD Bitoffset of pbyIecAddress in the IEC process image. wSize WORD Size in bits of the channel. wDummy WORD This parameter is now used for the base type information. This information is needed for a correct swapping action. – wBaseTypeInformation : WORD; – compiler relies on the name ‘wDummy’ here dwDriverSpecific XWORD Driver specific entry. Reserved for the usage in the driver.
IoConfigConnector (STRUCT) ¶ TYPE IoConfigConnector : STRUCT Connector information. Each device is described completely as a set of one input- and one or more output-conenctors. InOut: Name Type Comment wType WORD Type of the connector. See category “Connector types” for detailed information. wOptions WORD Connector options. See category “Connector options” for detailed information. dwFlags DWORD Connector flags. See category “Connector flags” for detailed information. hIoDrv RTS_IEC_HANDLE Registered instance handle of the IO-driver, that operates this device respectively this connector. dwNumOfParameters DWORD Number of parameters in the parameter list. pParameterList POINTER TO IoConfigParameter Pointer to the parameter list, that contains all parameters of this connector. pFather POINTER TO IoConfigConnector Pointer to the father connector to describe the device tree.
IoConfigConnectorMap (STRUCT) ¶ TYPE IoConfigConnectorMap : STRUCT Connector map to describe all IO-channels of one connector InOut: Name Type Comment pConnector POINTER TO IoConfigConnector Pointer to the corresponding connector. dwIoMgrSpecific XWORD IO-manager specific entry. dwNumOfChannels DWORD Number of channels in the channel map list. pChannelMapList POINTER TO IoConfigChannelMap Pointer to channel map list.
IoConfigParameter (STRUCT) ¶ TYPE IoConfigParameter : STRUCT Parameter description. This entry describes completely a parameter of an connector. InOut: Name Type Comment dwParameterId DWORD ID of the parameter. This ID is specified in the device description. dwValue XWORD Value (if is valud < 4 bytes) or a pointer to the value of the parameter. wType WORD Type class of the parameter. See category “Type class” for detailed information. wLen WORD Length of the parameter in bits. dwFlags DWORD Parameter value flags. See category “Parameter value flags” for detailed information. Bit 16 to 31 are used for extended parameters (size exceeding 65535 Bits,8192 Bytes) dwDriverSpecific XWORD Driver specific entry. Reserved for the usage in the driver.
IoConfigTaskMap (STRUCT) ¶ TYPE IoConfigTaskMap : STRUCT Mapping description for each task. InOut: Name Type Comment dwTaskId DWORD Index of the IEC task. wType WORD Input or output type. See category “Task map types” for detailed information. wNumOfConnectorMap WORD Number of connector maps int the connector map list. pConnectorMapList POINTER TO IoConfigConnectorMap Pointer to the connector map list.
LockScopes (GVL) ¶ Scopes for mutual-exclusion locks to be used with the dwLockScope parameters of the functions IoMgrLockEnter() and IoMgrLockLeave() . Note: Use both locks IOMGR_LOCK_WRITE_OUTPUTS OR IOMGR_LOCK_READ_INPUTS in the function IoDrvStartBusCycle() . InOut: Scope Name Type Initial Comment Constant IOMGR_LOCK_READ_INPUTS DWORD 16#1 Lock critical sections in IoDrvReadInputs() and IoDrvStartBusCycle(). IOMGR_LOCK_WRITE_OUTPUTS DWORD 16#2 Lock critical sections in IoDrvWriteOutputs() and IoDrvStartBusCycle().
ParameterValueFlags (GVL) ¶ Parameter value flags InOut: Scope Name Type Initial Comment Constant PVF_FUNCTION WORD 16#1 Functional access TO the parameter, Value is a FUNCTION POINTER. PVF_POINTER WORD 16#2 Value is a pointer to the value PVF_VALUE WORD 16#4 Value can be interpreted directly as a value (max. 32 Bit datatypes). PVF_READ WORD 16#10 Parameter can be read. PVF_WRITE WORD 16#20 Parameter can be written PVF_BIDIRECTIONAL WORD 16#100 Output is bidirectional. There will be a call in IoDrvWriteOutputs as well as in IoDrvReadInputs