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
PinConfiguration ¶ ConfigurePinAI (Method) ConfigurePinDI (Method) ConfigurePinDO (Method) GetRegisterOffset (Method) IsChannelEnabled (Method) Phys2Virt (Method) ReadPin (Method) SetBitOffset (Method) SetRegisterOffset (Method) SetRegisterPointer (Method) WritePin (Method)
IoDrvGPIOBase.ConfigurePinAI (METH) ¶ METHOD ConfigurePinAI : BOOL InOut: Scope Name Type Return ConfigurePinAI BOOL Input dwPinNr DWORD
IoDrvGPIOBase.ConfigurePinDI (METH) ¶ METHOD ConfigurePinDI : BOOL InOut: Scope Name Type Return ConfigurePinDI BOOL Input dwPinNr DWORD
IoDrvGPIOBase.ConfigurePinDO (METH) ¶ METHOD ConfigurePinDO : BOOL InOut: Scope Name Type Return ConfigurePinDO BOOL Input dwPinNr DWORD
IoDrvGPIOBase.GetRegisterOffset (METH) ¶ METHOD GetRegisterOffset : UDINT Get 32 bit register value InOut: Scope Name Type Return GetRegisterOffset UDINT Input iRegion INT dwOffset DWORD