STUDIO 5000 - IMPORT FROM TXT SOURCE FILES

Important:
TXT files cannot be imported automatically like TIA SCL sources.
They are copy sources for manual setup in older Studio 5000 versions.

Import order:
1. Create UDTs
2. Create AOIs
3. Create AOI parameters and local tags
4. Paste Structured Text code
5. Create tags
6. Add AOI call
7. Connect device data
8. Verify controller

Step 1 - Create UDTs
Create all User-Defined Data Types first.
Use the names, members and data types from the TXT files.

Step 2 - Create AOIs
Create the Add-On Instructions:
AOI_Smart_Automation_Interface
AOI_ConvertFloat
AOI_ConvertJSN
AOI_ErrorCode

Step 3 - Create parameters and local tags
Add all parameters and local tags exactly as listed in the TXT files.
Use the same Usage, Data Type and Default values.

Step 4 - Paste ST code
Open the AOI Structured Text routine and paste the matching TXT code.
If TRUE/FALSE is not accepted, use 1/0.

Step 5 - Create tags
Create the required Controller Tags or Program Tags for the AOI call.

Step 6 - Add AOI call
Insert AOI_Smart_Automation_Interface into the routine and connect all parameters.

Step 7 - Connect device
RawIn  = Device:I.Data
RawOut = Device:O.Data

Do not use:
Device:I.Data[0]
Device:O.Data[0]

Expected device layout:
Input  = 264 SINT
Output = 48 SINT

Step 8 - Verify
Run Verify Controller.
Fix missing tags, wrong data types or array-size errors before download.