Solution
You can use the Calculated Channel to check whether the conditions meets the requirements, and then assign a constant or user-input value for 'if True' condition, and another constant or user-input value for 'Else' condition. For the 'Channel Value', you can create a User Channel in 'User Channels' tab, and assign it to 'Channel Value'.

Figure 1. Calculated Channels Settings.
After Calculated Channel is configured, map the Calculated Channel to the specific AO ports:

Figure 2. System Configuration Mappings.