ProcUnit::GetIoModule

Gets I/O module instance

IoModule *GetIoModule(
    TCHAR *ioIdent
)

IoModule *GetIoModule(
    int ioModuleNo
)

Parameters
*ioIdent
I/O module ident name
ioModuleNo
I/O module number

Return Value
I/O module instance.

Description
Gets I/O module instance.
I/O module ident name is as follows:
ParallelIo Parallel I/O
SerialNormal Serial normal
SerialNormal2 Serial normal2
SerialPlcLink Serial PLC link
UdpNormal Ethernet UDP normal
UdpNormal2 Ethernet UDP normal2
UdpPlcLink Ethernet UDP PLC link
I/O module number is as follows:
0:Communication related to Parallel (ParallelIo)
1:Communication related to Serial (SerialNormal/SerialNormal2/SerialPlcLink)
2:Communication related Ethernet (UdpNormal/UdpNormal2/UdpPlcLink)

Example
   void Sample::OutPutData(void *data, int size, ProcUnit *ptrProcUnit)
    {

        // Gets I/O module instance

        IoModule *ptrIoModule0 = ptrProcUnit->GetIoModule(_T("ParallelIo"));

        // Gets I/O module instance

        IoModule *ptrIoModule1 = ptrProcUnit->GetIoModule(IOMODULE_UDP_NO);

    }