If I look at examples of IEC IO-driver implementations, I see two different approaches for developing IEC IO-drviers.
Here are two examples from devdesc.xml:
   <DriverInfoneedsBusCycle="false">
    <RequiredLib .... >
     <FBInstancebasename="$(DeviceName)" ... >
      <InitializemethodName="Initialize"/>
      <CyclicCallmethodname="AfterReadInputs"task="#buscycletask"whentocall="afterReadInputs"/>
     </FBInstance>
    </RequiredLib>
   </DriverInfo>
and
 <DriverInfoneedsBusCycle="true">
    <RequiredLiblibname... >
     <FBInstancebasename="$(DeviceName)_Instance" ... >
      <InitializemethodName="Initialize"/>
     </FBInstance>
    </RequiredLib>
   </DriverInfo>
As I understand, in the first case FB of any type can be used as a IEC-driver. Method AfterReadInputs is called every cycle after read inputs.
In the second case methods IoDrvReadInputs, IoDrvWriteInputs (when IO are used in IEC program) and IoDrvStartBusCycle (when needBusCycle is set to true) are called every cycle as well.
What is the main reason to use first or second method?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If I look at examples of IEC IO-driver implementations, I see two different approaches for developing IEC IO-drviers.
Here are two examples from devdesc.xml:
and
As I understand, in the first case FB of any type can be used as a IEC-driver. Method AfterReadInputs is called every cycle after read inputs.
In the second case methods IoDrvReadInputs, IoDrvWriteInputs (when IO are used in IEC program) and IoDrvStartBusCycle (when needBusCycle is set to true) are called every cycle as well.
What is the main reason to use first or second method?