Many manufacturing companies are facing an increasing amount of changes and uncertainty, caused by both internal and external factors. Frequently changing customer and market demands lead to variations in manufacturing quantities, product design and shorter product life-cycles, and variations in manufacturing capability and functionality contribute to a high level of uncertainty. The result is unpredictable manufacturing system performance, with an increased number of unforeseen events occurring in these systems. Such events are difficult for traditional planning and control systems to satisfactorily manage. For scenarios like these, with a dynamically changing manufacturing environment, adaptive decision making is crucial for successfully performing manufacturing operations. Relying on real-time information of manufacturing processes and operations, and their enabling resources, adaptive decision making can be realized with a control approach combining IEC 61499 event-driven Function Blocks (FBs) with manufacturing features. These FBs are small decision-making modules with embedded algorithms designed to generate the desired equipment control code. When dynamically triggered by event inputs, parameter values in their data inputs are forwarded to the appropriate algorithms, which generate new events and data output as control instructions. The data inputs also include monitored real-time information which allows the dynamic creation of equipment control code adapted to the actual run-time conditions on the shop-floor. Manufacturing features build on the concept that a manufacturing task can be broken down into a sequence of minor basic operations, in this research assembly features (AFs). These features define atomic assembly operations, and by combining and implementing these in the event-driven FB embedded algorithms, automatic code generation is possible. A test case with a virtual robot assembly cell is presented, demonstrating the functionality of the proposed control approach.