IoDrvGPIOBBB (FB) ¶ FUNCTION_BLOCK IoDrvGPIOBBB EXTENDS IoDrvGPIOBase Methods: ConfigurePinAI ConfigurePinDI ConfigurePinDO IsChannelEnabled ReadPin GetRegisterOffset , inherited from IoDrvGPIOBase IoDrvGetConnector , inherited from IoDrvGPIOBase IoDrvGetModuleDiagnosis , inherited from IoDrvGPIOBase IoDrvReadParameter , inherited from IoDrvGPIOBase IoDrvWriteParameter , inherited from IoDrvGPIOBase Phys2Virt , inherited from IoDrvGPIOBase QueryInterface , inherited from IoDrvGPIOBase SetBitOffset , inherited from IoDrvGPIOBase SetRegisterOffset , inherited from IoDrvGPIOBase SetRegisterPointer , inherited from IoDrvGPIOBase WritePin , inherited from IoDrvGPIOBase Structure: ConfigurePinAI (Method) ConfigurePinDI (Method) ConfigurePinDO (Method) IsChannelEnabled (Method) ReadPin (Method)
IoDrvGPIOBBB.ConfigurePinAI (METH) ¶ METHOD ConfigurePinAI : BOOL InOut: Scope Name Type Comment Return ConfigurePinAI BOOL Input dwPinNr DWORD 128.. 134
IoDrvGPIOBBB.ConfigurePinDI (METH) ¶ METHOD ConfigurePinDI : BOOL InOut: Scope Name Type Return ConfigurePinDI BOOL Input dwPinNr DWORD
IoDrvGPIOBBB.ConfigurePinDO (METH) ¶ METHOD ConfigurePinDO : BOOL InOut: Scope Name Type Return ConfigurePinDO BOOL Input dwPinNr DWORD
IoDrvGPIOBBB.IsChannelEnabled (METH) ¶ METHOD IsChannelEnabled : BOOL InOut: Scope Name Type Return IsChannelEnabled BOOL Input dwChannel DWORD eFunction PinFunction
IoDrvGPIOBBB.ReadPin (METH) ¶ METHOD ReadPin : BOOL InOut: Scope Name Type Return ReadPin BOOL Input dwParameterID DWORD
IoDrvGPIOBase (FB) ¶ FUNCTION_BLOCK IoDrvGPIOBase EXTENDS IoDrvBase IMPLEMENTS ICmpIoDrvParameter This is a rather generic FB, which is able to handle the I/Os on linux based systems. It is not fully generic, that’s why it not resides in an own library. Still the configuration of the I/O pins for the different functions needs to be implemented in a specialized FB. Every single pin is configured with the functions: ConfigurePinDI (pin number) ConfigurePinDO (pin number) The configuration is done based on enums where the Parameter ID corresponds to the pin number. One special paramter (10.000) defines the total number of pins. All registers are mapped into our address space. As we are running on linux, where we have a virtual address space, the addresses need to be converted. This allocation and convertion is done in this base driver: UpdateConfiguration manages the regions, which are defined in g_aMemRegions[] SetRegister* / SetBit* / Phys2Virt are using those regions To exchange the I/Os, the physical address for the exchange is specified in the driverSpecific value in the device description for each parameter. Those addresses are converted to their virtual counterparts in UpdateConfiguration. Furthermore, UpdateConfiguration takes care about not configured I/Os. All I/O channels which are not configured are getting a driver specific value in the device description. This is then the physical address, which is converted by UpdateConfiguration to the virtual addresses, so that ReadInputs() and WriteOutputs() can copy the data easily with the standard IoMgrCopyInputs()/-CopyOutputs() functions. Methods: ConfigurePinAI ConfigurePinDI ConfigurePinDO GetRegisterOffset IoDrvGetConnector IoDrvGetModuleDiagnosis IoDrvReadParameter IoDrvWriteParameter IsChannelEnabled Phys2Virt QueryInterface ReadPin SetBitOffset SetRegisterOffset SetRegisterPointer WritePin Structure: IBase QueryInterface (Method) ICmpIoDrv IoDrvGetModuleDiagnosis (Method) ICmpIoDrvConfig IoDrvGetConnector (Method) ICmpIoDrvParameter IoDrvReadParameter (Method) IoDrvWriteParameter (Method) PinConfiguration ConfigurePinAI (Method) ConfigurePinDI (Method) ConfigurePinDO (Method) GetRegisterOffset (Method) IsChannelEnabled (Method) Phys2Virt (Method) ReadPin (Method) SetBitOffset (Method) SetRegisterOffset (Method) SetRegisterPointer (Method) WritePin (Method)
IBase ¶ QueryInterface (Method)
IoDrvGPIOBase.IoDrvReadParameter (METH) ¶ METHOD IoDrvReadParameter : UDINT InOut: Scope Name Type Return IoDrvReadParameter UDINT Input pConnector POINTER TO IoConfigConnector pParameter POINTER TO IoConfigParameter pData POINTER TO BYTE dwBitSize DWORD dwBitOffset DWORD
IoDrvGPIOBase.IoDrvWriteParameter (METH) ¶ METHOD IoDrvWriteParameter : UDINT InOut: Scope Name Type Return IoDrvWriteParameter UDINT Input pConnector POINTER TO IoConfigConnector pParameter POINTER TO IoConfigParameter pData POINTER TO BYTE dwBitSize DWORD dwBitOffset DWORD