Results 1 to 5 of 5
  1. #1

    Circon Programming Question

    if you look at the program i have had to hard code a diff of 2.0 in order for the program to work. i wanted to use the nvi8FloorAveDB as a user changeable DB but when i use it instead of the 2.0 i can not get it to work. the Floor1HeatingCall comes on but never turns off.

    any ideas?



    11- Input I Output channel Declarations


    channel input 0 uiOPump5Status
    as SNVT_amp

    channel input 1 ui1Pump6Status
    a~ ~NVT_amp

    channel input 2 ui2Pump7Status
    as SNVT_amp

    channel input 3 ui3Pump8Status
    as sNvT_amp

    channel input 4 ui4HWPumpStatus
    as sNvT_amp

    channel input 5 ui5SupplyTemp
    as SNVT_temp_p

    channel input 6 ui6
    as SNVT_lev_disc

    channel input 7 ui7
    as ~NVT_lev_dlsc

    channel input 8 ui8
    as SNVT_lev_disc

    channel input 9 ui9
    as sNvT_lev_disc

    channel input 10 ui10
    as sNvT_lev_disc

    channel input 11 ui11
    as SNVT_lev_disc

    channel output 0 uoOPump5Control as SNVT_lev_disc

    channel output 1 uo1Pump6Control as sNVT_lev_disc

    channel output 2 uo2Pump7control as sNVT_lev_disc

    channel output 3 uo3Pump8control as sNVT_lev_disc

    channel output 4 uo4HWPumpControl as SNVT_lev_disc


    II

    1/- Network Variable 'Jsage Definitions
    network input
    0
    nviOAH1Run
    as sNVT_lev_disc
    11<--- from AHU1
    nvo7AHUrun
    network input
    1
    nvi 1AH2Run
    as SNVT_lev_disc
    11<--- from AHU2
    nvo7AHUrun
    network input
    2
    nvi2AH3Run
    as SNvT_lev_disc
    11<--- from AHU3
    nvo7AHUrun
    network input
    3
    nvi3AH4Run
    as SNVT_lev_disc
    //<--- from AHU4
    nvo7AHurun
    12/14/2007 3:40:20 PM




    Page: 1 of 7


    network input
    4
    nvi4Floor1AveTemp
    as SNVCtemp_p
    network input
    5
    nvi5Floor2_3AveTemp
    as SNVT_temp_p
    network input
    6
    nvi6Floor4AveTemp
    as sNVT_temp_p
    network input
    7
    nvi7Floor5AveTemp
    as sNVT_temp_p
    network input
    8
    nvi8FloorAveDB
    as sNVT_temp_p
    network input
    9
    nvi9
    as SNVT_lev_.di sc
    network input
    10
    nvilO
    as SNVT_lev_disc
    netwo rk input
    11
    nvi110sAtemp
    as SNVT_temp_p
    network output 0 nvoOCalcsp
    as SNVT_temp_p
    network output 1 nvo1
    as SNVT_lev_disc
    network output 2 nvo2
    as SNVT_lev_disc
    network output 3 nvo3
    as sNVT_lev_dlsc
    network output 4 nvo4Floor1Heatingcall
    as SNVT_lev_disc
    network output 5 nvo5Floor2_3Heatlngcall
    as SNVT_lev_disc
    network output 6 nvo6Floor4Heatingcall
    as SNVT_lev_disc
    network output 7 nvo7Floor5Heatingcall
    as SNVT_lev_disc
    II


    11- configuration variable usage Definitions
    appee
    o eeOFloorAveDB as SNVT.temp_p
    appram appram appram
    o ramOHHWValvePIDOUT 1 ram1HHWTempSP
    2 ram2heating
    as sNVT_lev_percent as SNVT temp_p
    as SNVT_lev_disc
    II

    11- Definition of useful Constants
    canst ST_OFF
    as integer = 0
    canst ST_ON
    as integer = 4
    canst DISABLED
    as integer = 0
    const ENABLED
    as integer = 1
    const TRUE
    as integer = 1
    const FALSE
    as integer = 0
    const CH_IN
    as integer = 0
    const CH_OUT
    as i"t~er = 1
    II

    11- Global Variables & timers
    Page: 2 of 7

    dim heating as integer
    dim FloorlHeatingcall as integer
    dim Floor2_3Heatlngcall as integer
    dim Floor4Heatingcall as integer
    dim FloorSHeatingcall as integer
    dim pumpTurnoff as int~ger
    timer pumpDelayonBreak
    //############################################ Task 1
    task
    uo7 = ST_OFF uo8 = ST_OFF uo9 = ST_OFF
    nvo3 = ST_OFF nvo4FloorlHeatingcall = ST_OFF nvoSFloor2_3Heatlngcall = ST_OFF nvo6Floor4Heatingcal1 = ST_OFF nvo7FloorSHeatingcal1 = ST_OFF PumpDelayonBreak = 0 nvi8FloorAveDB = eeOFloorAveDB uoOpumpSControl=sT_OFF
    TOPOFTASK:
    if (nvi8FloorAveDB <> eeOFloorAveDB) then eeOFloorAveDB = nvi8FloorAveDB end if
    //**********************************************OSAL ockout******************************************** *****************
    heating = on_fall(nvillosAtemp,f_to_c(7S.0),f_to_c(2.0+32.0) ,heating)
    if (heating=TRuE) then
    ram2heating=ST_ON else ram2heating=sT_OFF end if
    12114120073:40:20 PM
    Page: 3017

    //**********************************************Aver age Temp Call Floor 1
    Floor1Heatingcall = on_fall(nvi4Floor1AveTemp,f_to_c(71.0),f_to_c(2.0+32.0),Floor1Heatingcall) if (Floor1Heatingcall = TRUE) then
    nvo4Floor1Heatingcall = ST_ON
    else
    nvo4Floor1Heatingcall = ST_OFF end if
    ///*********************************************Avera ge Temp call Floor 2_3

  2. #2
    Join Date
    May 2002
    Posts
    9,564
    Your variable (nvi) needs a type change. Add a "dim" to get a "f" variable. (fixed)

    Arguments
    value is type fixed (signed fixed) test value
    setpoint is type fixed (signed fixed) reference value
    deadband is type fixed (signed fixed) deadband value
    last_value is type integer (signed integer) last value returned by this function

    .... It's one of those things that most GPL based programs do internally.


    EDIT: Something tells me you will have a problem with this too: "dim pumpTurnoff as int~ger"
    Last edited by sysint; 12-17-2007 at 09:26 AM.

  3. #3
    i created the nvi8FloorAveDB as a SNVT_temp_p for the signed fixed requirement. still can not get to work.

    also, i had a 10000 character requirement so i had to cut the program down. that is probably why some of the program does not look kosher.

  4. #4
    Join Date
    May 2002
    Posts
    9,564
    No. you didn't declare a fixed variable for DB. You have a nvi as the variable. It needs to be fixed.

    dim fAvgFloor as fixed
    fAvgFloor = int_to_fix(nvi8FloorAveDB)

    Try that.

    EDIT: first line in argument is fixed also....
    Last edited by sysint; 12-17-2007 at 02:19 PM.

  5. #5
    SNVT_temp_p degrees Celsius signed fixed .2
    273.17 .. 327.66 degrees Celsius

    (0.01 degrees Celsius)

    i do not understand. why would i have to do this if the nvi8FloorAveDB i created is a SNVT_temp_p. i took the above directly from the circon literature. it already is a signed fixed variable by definition.

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