UDTs are object-based constructs that allow you to create custom structures containing a number of different data types. UDTs are used to organize data into objects that align with the properties of physical-world equipment. In the case of fault trapping, we will be using a UDT to capture the details of a major fault, which is covered in the next section.
Trapping a fault
In the following exercise, we will trap a major fault and clear it before the controller stops the previously mentioned steps:
- In order to trap a major fault, we must create a User-Defined data type to store the fault information.
- In the Data Type window that appears, creates the followingFAULTRECORD UDT:
- We will need to add an instance of our newly created FAULTRECORD UDT to our project at the MainProgram scope level:
...