AndreyS - 2013-12-25

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:

      <DriverInfo needsBusCycle="false">
        <RequiredLib .... >
          <FBInstance basename="$(DeviceName)" ... >
            <Initialize methodName="Initialize" />
            <CyclicCall methodname="AfterReadInputs" task="#buscycletask" whentocall="afterReadInputs" />
          </FBInstance>
        </RequiredLib>
      </DriverInfo>

and

 <DriverInfo needsBusCycle="true">
        <RequiredLib libname... >
          <FBInstance basename="$(DeviceName)_Instance" ... >
            <Initialize methodName="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?