Results 1 to 9 of 9
  1. #1
    Join Date
    Jun 2005
    Location
    Ohio
    Posts
    1,720

    Summit/CPL Question

    I'm trying to revise a CPL which will synchronize 2 Intellipaks VFD speed by adjusting their static pressure setpoints. I'm working offline and when I try to compile the CPL text file, I get a syntax error in the DEFFLT line. I looked in the CPL manual and it says while compiling, the editor looks for objects/properties in the site database. I am not connected to that database. Will that give me this syntax error?
    Here's the line giving the syntax error:
    DEFFLT m, VFD, VFD_Max, VFD_Min, STPT
    TIA for any help on this.
    jogas

  2. #2
    Join Date
    Jul 2001
    Location
    maryland
    Posts
    1,355
    Your problem could be in the line the compiler showed you or in any line above it. Post the entire program.

    -JB

  3. #3
    Join Date
    May 2007
    Location
    Pacific Northwest
    Posts
    38
    Quote Originally Posted by jogas View Post
    I'm trying to revise a CPL which will synchronize 2 Intellipaks VFD speed by adjusting their static pressure setpoints. I'm working offline and when I try to compile the CPL text file, I get a syntax error in the DEFFLT line. I looked in the CPL manual and it says while compiling, the editor looks for objects/properties in the site database. I am not connected to that database. Will that give me this syntax error?
    Absolutely!! When you are using the compiler in Summit you have to be logged into a site. If the site you are logged into (not necessarily connected to) is not the one that you are compiling the CPL for, then the object names in your CPL program probably don't exist in the database your are logged into.

    Here is a quote right out of the V17 System Programming manual: "The names of objects and properties used in the program must exactly match the names in the database." If you are trying compile this program while logged into a different site database then the object names won't match because they don't even exist.

    Quote Originally Posted by jogas View Post
    Here's the line giving the syntax error:
    DEFFLT m, VFD, VFD_Max, VFD_Min, STPT
    TIA for any help on this.
    jogas
    This statement looks fine to me. In my experience I have found that the line the compiler calls out as the offending statement is only accurate maybe half the time or so. As mallron mentioned, "Your problem could be in the line the compiler showed you or in any line above it." This is true and there is a very good reason that this happens. Here's a quick example off of the top of my head:

    //
    DEFINT On, Off, Open, Closed,
    DEFFLT m, VFD, VFD_Max, VFD_Min, STPT
    //

    The above example will generate a compile error and tell you the 2nd line is causing the problem even though the 1st line is causing the problem because of a syntax error. The first line should end with empty space after 'Closed' instead of a comma. Since the word 'Closed' has a comma after it the compiler is expecting to assign the next letters or words (DEFFLT) as an Integer variable. But..... DEFFLT is a 'RESERVED' word. The compiler thinks to itself, "DEFFLT is a reserved word. That word can't be used as an Integer variable. I need to notify the programmer that he has a problem with the 2nd line."

    I hope that clears things up for you a bit.

    Knobber

  4. #4
    Join Date
    Nov 2004
    Location
    Practically Canadian ehh.
    Posts
    675
    Looks like a problem in another line, need to see the rest to help.

    kw

  5. #5
    Join Date
    Jun 2005
    Location
    Ohio
    Posts
    1,720
    I finally got back to the site and used the CPL text that ricshell1 sent, revised it, compiled, and loaded it into the database. It worked fine. The only change I made is to set the DIFF value to 85 instead of the 80 shown here. That ended up keeping the Intellipaks VFD's within about 10% of each other.
    Here it is:

    Program RTU_Sync

    /// Written: JAA



    DEFINT Off, On=1, Fan1, Fan2

    DEFFLT STPT1, STPT2, STPT, VFD1, VFD2,
    MAXVFD, MINVFD, DIFF

    /// This routine is written to match VFD speed on Intellipaks RTU 1 and 2



    /// Routine Execution: This program is executed once every 10 seconds

    /// Routine Text File: This CPL object uses the text file named RTU Sync.CPL
    STPT = {RTU Sync St Pr Setpt}.{Present Value}
    VFD1 = {RTU-1}.{Supply Fan: IGV/VFD Position}
    VFD2 = {RTU-2}.{Supply Fan: IGV/VFD Position}
    Fan1 = {RTU-1}.{Supply Fan Status}
    Fan2 = {RTU-2}.{Supply Fan Status}
    MAXVFD = MAX ( VFD1, VFD2 )
    MINVFD = MIN ( VFD1, VFD2 )
    DIFF = ( MINVFD / MAXVFD ) * 100
    IF ( ( DIFF <= 80 ) AND ( VFD2 > VFD1) )
    THEN
    STPT1 = STPT + 0.25000000
    STPT2 = STPT - 0.25000000
    END IF
    IF ( ( DIFF <= 80 ) AND ( VFD1 > VFD2 ) )
    THEN
    STPT2 = STPT + 0.25000000
    STPT1 = STPT - 0.25000000
    END IF
    IF ( ( DIFF > 80) OR (Fan1 = Off) OR (Fan2 = Off ) )
    THEN
    STPT1 = STPT
    STPT2 = STPT
    END IF
    IF ( Fan1 = Off )
    THEN
    STPT1 = 0.100000
    END IF
    IF ( Fan2 = Off )
    THEN
    STPT2 = 0.100000
    END IF
    IF ({RTU1 Duct Static Setpoint}.{Present Value} <> STPT1 )
    THEN
    CONTROL ({RTU1 Duct Static Setpoint},{Present Value},STPT1,5,Set)
    END IF
    IF ( {RTU2 Duct Static Setpoint}.{Present Value} <> STPT2 )
    THEN
    CONTROL({RTU2 Duct Static Setpoint},{Present Value},STPT2,5,Set)
    END IF
    END

    Thanks again for the replies and help.
    jogas

  6. #6
    Join Date
    Apr 2005
    Location
    Boulder,CO.
    Posts
    559
    Your welcome.


    P.S. juno dot com

  7. #7
    Join Date
    Dec 2005
    Posts
    3
    I browse through this site every now and then, but very rarely can help....But,
    //
    DEFINT On, Off, Open, Closed,
    DEFFLT m, VFD, VFD_Max, VFD_Min, STPT
    //

    The problem is usually 1 line above or below where the compiler says it is. The problem is the comma at the end of the DEFINT. The compiler is expecting another entry after the comma.

  8. #8
    Join Date
    May 2007
    Location
    Pacific Northwest
    Posts
    38

    That CPL code was an example of a syntax error

    Quote Originally Posted by mikeyd View Post
    I browse through this site every now and then, but very rarely can help....But,
    //
    DEFINT On, Off, Open, Closed,
    DEFFLT m, VFD, VFD_Max, VFD_Min, STPT
    //

    The problem is usually 1 line above or below where the compiler says it is. The problem is the comma at the end of the DEFINT. The compiler is expecting another entry after the comma.
    The code you are referring to in your message was from my post and was showing an example of a syntax error. I thought I had made that pretty clear in my message and explained what was wrong with the code. Did you read the whole message that you copied the code from?

    Knobber

  9. #9
    Join Date
    Dec 2005
    Posts
    3
    My apologies. I was sitting at the back of the classroom and caught a glimpse of something I knew and got excited.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Comfortech Show Promo Image

Related Forums

Plumbing Talks | Contractor Magazine
Forums | Electrical Construction & Maintenance (EC&M) Magazine
Comfortech365 Virtual Event