Hi there Ron
First I just want to say that clock scheduling can easily be done with a Performance Equation. In fact, it's as common as using another tag to schedule by. Read the manual to find out how (hint: search for how to define a scan class)!
Secondly, it appears you've just pasted the PE itself directly into the ACECalculations() method. This cannot be done, you'll have to use the Visual Basic programming language, and you'll also have to use the ACE Wizard to create your ACE project and define the output tag. I'll invite you to read the manual for that as well, or download some class materials from an ACE programming course (from the techsupport pages).
Based on your requirements here, I think you'll be better off with just keeping the Performance Equation tag (first option) and add a scan class which suits your needs.
More specifically, go to the vCampus Library, find the vCampus PI Products Kit, and then Server Products. Here you can either view the PI ACE Manual (complete with step-by-step tutorial) or you can select the category PI Server. Here you'll find the PI Server Applications User Guide - and under Chapter 2 you'll find the details for the PI Performance Equation Scheduler - and how to create a PE and define a scan class to fit your needs.
Thanks for the advice! I'm going to go ahead and build this in ACE because we will have many tags and I would like the calculations to be done separately from our PI server. I will look into the Scan Class settings for some of our other tags. The below code works well. A cup of coffee cleared the cob webs! Thanks, Ron
Public Overrides SubACECalculations() If NR_Unit_1_MWh_Out.Value < NR_Unit_1_MWh_Out.PrevVal("*-1h") Then NR_Unit_1_Mwh_Out_Hourly.Value = (NR_Unit_1_MWh_Out.Value - NR_Unit_1_MWh_Out.PrevVal("*-1h")) + 1000000 Else : NR_Unit_1_Mwh_Out_Hourly.Value = NR_Unit_1_MWh_Out.Value - NR_Unit_1_MWh_Out.PrevVal("*-1h") End If