It looks like setting is working as expected. See chapter "15.3.1 Diagnostics state (0018 hex: DiagState)" in the manual mentioned above for more details about the diagnostics.
I guess you are not attaching any current to the AI module when setting 4..20mA is done and then the module shows an open circuit error. On an AO module if you command e.g. 0000hex the value would be out of range and also an error is shown for that case.
... View more