Use the IODDTs, T_ANA_IN_BMX for inputs and T_ANA_OUT_BMX for outputs in conjunction with the WRITE_CMD function block.
Once the WRITE_CMD function block in enabled, the two variable below of the IODDT, can be used to force the analog value. First assign the value (CMD_FORCING_VALUE) and then set the bit (FORCING_UNFORCING_ORDER). Reset the bit ((FORCING_UNFORCING_ORDER)) to unforce the analog channel.
Standard symbol Type Access Meaning Address
FORCING_UNFORCING_ORDER BOOL R/W Forcing/unforcing command. %MWr.m.c.4.13
CMD_FORCING_VALUE INT R/W Forcing value to be applied. %MWr.m.c.5
In order to force a channel, you have to use the WRITE_CMD (%MWr.m.c.5) instruction and set the %MWr.m.c.4.13 bit to 1.
To unforce a channel and use it normally, you have to set the %MWr.m.c.4.13 bit to 0.