Example 9 Example This example offers an introduction into the handling of function block FB_SPA [ } 13] , which is available with the TwinCAT Solar Position Algorithm library. The objective in this example is to determine the sun position on 4 March 2010 at 14:27:00 at the Cheops pyramid in Egypt. Time zone: UTC + 2 hours Latitude: 29.979, [°] Longitude: 31.134 [°] Height: 70 [m] Annual average temperature: 21.7 [°C] Other locations and times are determined similarly. Overview The following steps are now performed: 1. Installation of the PLC library 2. Program structure 3. Test 1. Installation of the PLC library Start TwinCAT PLC Control. Create a new PLC project with 'File > New'.
Select your target platform PC and CX (x86) or CX (ARM). Your first POU is a program called MAIN and in the programming language ST (Structured Text). Open the Resources tab and the library manager. Insert the library TcSPA.lib as shown in the picture below via 'Insert > Further library'. TS3900 22 Version: 1.1