CRX RefrigerationRevision History

**********************************************************************************

V00.01201003

First release version of CRX Ref Controller firmware

**********************************************************************************

V00.0220110310

Started work on the WW string.

Changed the binary to ascii routine to make it more efficient as well as not requiring different routines for decimal and negative numbers. Now must set a dec flag and/or a neg flag if those numbers need decimals or may be negative.

Added a condenser fan differential to $287:$288 E2. Changed the condenser fan routine to use multiples of the differential instead of percentages to turn fans off and on.

Fixed the floating setpoint in the cfan routine. Was set at dpsp + system drop but should have been suction pressure + system drop. Also now multiply system drop by ten, since it doesn't have tenths.

**********************************************************************************

V00.0320110310

Added virtual man-off-auto switches to the two 0-20 mA outputs. Can now program VFD fans and VFD compressor with a manual percentage output.

Added defaults for the pwm mins and maxes as well as the aom switchs.

Rewrote all of the pwm routines to make them much more efficient.

**********************************************************************************

V00.0420110328

Rewrote all of the math calculations to make them more efficient and to try to not have to use the divide routine, which is very complex and resource hungry. Added simpler divide routines for specific situations like 24 bits by 8 or 16 bits, a specific divide by a constant 10, etc. Also changed the routines to make the variables consistent - c:b as the dividend and resulting quotient and a as the divisor with the remainder in d (except for the divide by 10 routine, which discards the remainder).

Also changed the calculations to use as much divide by factors of 2 as possible to speed up the routines.

Cleaned up all of the display screens to make sure decimal is right. Also wrote a new routine to not display tenths on things that don't really need is (all pressure setpoints, etc). Also added the speed_key routine to speed up increments and decrements when holding down the arrow keys. Also moved the increments and decrements to subroutines to reduce code size significantly.

**********************************************************************************

V00.0520110718

Changed some of the E2 values to be 8 bit instead of 16 bit. Most of it was in the alarm timers as well as some of the alarm setpoints.

Changed the crankcase alarm to not just go off of time since last powerdown but also time since the contact was proven.

Reorganized the modes so that all alarms are > 30. This allows for more non-alarm modes to be added later and to keep those together (makes it easier to check for general alarm state).

Added in superheat calculations for suction and discharge pressures.

Added baudrate to the display and the unit ID number to the WW string.

Moved VFD_fan_manout and VFD_comp_manout from Bank2 of E2 to Bank 1

Now turn off outputs when in alarm, standby, or shutdown

Changed most alarms to be only active when the compressor is on

Added amps to CH4 of the QS string

**********************************************************************************

V00.0620110831

Fixed display problem. Was displaying "Heat" when should have been "Time".

*********************************************************************************

V00.0720111001

Fixed display problem. Was displaying "Heat" when should have been "Time" in program mode

Added a low suction defrost secondary mode for heatpump reversing mode. Active when defrost_profile = 5.

*********************************************************************************

V00.0820111002

Changed LS Def to HP def on display and WW string

Added a requirement that the compressor needed to be on to go into hp defrost.

Added an RD comm command to force defrost when in Heat mode

*********************************************************************************

V00.0920111003

Changed the WW string to show the heat output for the compressor when in Heat mode.

*********************************************************************************

V00.1020111108

Was having a problem with some of the displays blanking out. Found that the problem was in the routine that checks the display's busy flag after writing to the display. Found the busy flag for this display controller is flaky so replaced the busy flag check with a set time delay.

************************************************************************

V00.1120120126

Changed the screens so that most of programmable values are chosen on one parameter screen.

Reaaranged the E2 so that all 8-bit values were in bank 1, all 16 bit values that require a decimal point were in bank 2 and all 16-bit without a decimal point were in bank 3.

On some the displays, the first letter wasn't showing up. Increased the interface pulses by 50%.

************************************************************************

V00.1220120315

Added all of the possible input types to screens. If they aren't selected a blank is displayed instead of the value or 0.

Changed the screens to only update when there has been a change. This eliminated some flicker.

************************************************************************

V00.1320120412

Added a parameter dump in the receive file. A <PDxx>0047 command sends the parameter list out COM1.

Add the dynamic superheat control. This adjusts the evap superheat setpoint that is sent to the ER-110.

Limited the size of the receive buffers. A response to a WW on the network would overflow the buffer and write over the E2 values in bank 6 and 7. Now will wrap around afte 0x2F values.

************************************************************************

V00.1420120503

Added bitzer screw compressor logic with floating setpoint

Added more alarm inputs for screw compressor as well as more alarm modes

Defined digitial inputs for the spare inputs on the card so that we could move the run and pumpdown switch off of the main inputs.

Added aux heat and cool routine.

************************************************************************

V00.1520120514

Moved output and input config bytes to bank 4 of E2

Added aom virtual switches to each of the inputs and outputs.

For manual inputs, added a/d count parameters so that you can set the input to a constant value.

Now run check_e2 every 10s to make sure parameters aren't programmed out of range.

Moved the check_e2 routine and future default_e2 routine to a separate asm file, default.asm as the main asm file was getting too long.

Added a high discharge temp unload to the screw profile. Had to add an hdt unloader timer to parameter 71.

Added a high discharge pressure unload to the screw profile. Had to add an hdp unloader timer to parameter 72.

Added a low suction pressure unload to the screw profile. Had to add an lsp unloader timer to parameter 93, which required changes to the display and receive files.

Added a high amp unload to the screw profile. Had to add an ha unloader timer to parameter 86 and a ha control point to parameter 85.

Changed the "max unload" routine to use the pid update timer (pid 2) and to set the pulse length to half of the update timer instead of being constantly on. If not in refrig, the unload solenoid is on all of the time.

Found an error in the elapsed time routine when calculating the pd_hours for the crankcase alarm. Wasn't doing an addwfc so getting unpredictable results in the accumulator.

Changed the input config so that 18 = amps (50), 0-5V, 19 = amps (100), 0-5V, and 20 = amps (200), 0-5V.

For the screw profile, added oil pressure calculations (oil psi = discharge psi - suction psi) and changed the oil pressure alarm to trigger if oil psi < opa (screw profile only).

************************************************************************

V00.1620120606

Moved the switch polling and keyboard routine to the interrupt to try to improve the performance of the keyboard.

Fixed the display of the floating setpoint

Changed the ll routine for the screw compressor so that it would turn on and off correctly. Also, changed the routine to set the comp1_cfg instead of comp_control to turn on and off the ll.

The stage compressor routine had a bug that was sending the screw comp to recip staging (it shouldn't run at all if set to screw comp).

************************************************************************

V00.1720120613

The minimum pulsewidth was defaulting if set for more than 1000 ms. Needed a longer PW than that so now with only default if the high byte = $FF.

Added the panel temp to the WW string.

************************************************************************

V00.1820120613

Changed the temps in the WW string to only display if they have been defined and calculated (and in range).

Added output strings to the WW string to show if outputs are on or off.

Now don't scale the pid correction for the slide valve pid.

************************************************************************

V00.1920120614

Moved the amps screen on the display to the beginning of its row so that it is in the first column.

************************************************************************

V00.2020120619

Expanded the temp table from 131 degrees to 302

************************************************************************

V00.2120120619

The out of range check was flagging anything over $F00 as o/r (193 degrees). Changed it to over $FC9

(302 degrees).

************************************************************************

************************************************************************

V00.2220120629

In 2 equal VFD routine, now shut off LL when Rdemand < spanL

************************************************************************

V00.2320120629

Added minout to 2 equal VFD routine.

************************************************************************

V00.2420120709

Rewrote the 2 equal VFD compressor routine. Removed the complicated formulas since they were causing large jumps in the output. Now, from 25 - 49%, the lead or lag compressor runs at 2* Rdemand. At Rdemand >/= 50%, both compressors run at the Rdemand %.

Added unloading for the VFD compressors. If in a secondary mode that requires unloading, the VFD output is reduced 5% every 30 seconds (down to 50%) until the condition clears.

Added a two screw compressor comp profile (comp_profile = 5). Comp 1 is the lead compressor and comp 2 the lag. Each compressor calculates its horsepower and fsp but only comp 1 determines rather the ll is on or not. I had to add Rdemand to the SS string for the lag compressor. The lag comp replaces the calculated Rdemand with the external Rdemand if in dual screw mode and the ext_Rdemand </= 100.

************************************************************************

V00.2520120719

Reworked the QS string so that it works with the CRX values

Added a config byte and the secondary mode to the end of the QS string

Changed the display and WW string to read OLA instead of OLLA

Moved the voltmeter and filter routine to run at 10ms instead of 100ms. This is so it can be filtered higher without running too slowly.

Now don't disable communications when doing A/D capture

************************************************************************

V00.2620120801

Had a spurious command in the QS string that was causing it to shorten the string.

With the addition of the config byte, now don't have to do the mode translation in the QS string. Can now just send the straight mode.

************************************************************************

V00.2720120804

Put a command in to keep liquid line off if pump down switch on

************************************************************************

V00.2820120807

Added a new secondary mode (a_mode = 7) for the oil pressure unload in the screw compressors.

************************************************************************

************************************************************************

V00.2920120808

Added the pumpdown timer and alarm to the non-screw profiles

************************************************************************

V00.3020120822

Had a bug in the comm routine. The SR string was sending back a [ instead of a < so the master was ignoring it. Also needed to add a delay for response from the card so that the transmitter was off.

The rotation was commented out because it has a bug.

************************************************************************

V00.3120120902

Added a screen to turn the oil/vfd output on (if defined) for one second. Moved the bypass cchl screen so that these two were right after the home screen and moved the other screens over.

Changed the oil pressure unload so that it only runs with the screw comps. Also will now disable it if opt = 0.

Added a single recip mode to the recip compressor profile. With one compressor, the liquid line and unloaders just run off of their on and off points. Fixed bank error that was keeping the total run time from being cleared from the display.

************************************************************************

V00.3220120907

Messed up the opu routine in the last change, so corrected here.

Rearranged the WW string

************************************************************************

V00.3320120910

Made sure ll can't come on in short cycle

************************************************************************

V00.3420120920

Extended the vfd reset time to 3 seconds

************************************************************************

V00.3520121027

The Def Lo Suc CP (param 323) was defaulting to 50 if set above 50. Changed so that it defaults if set above 100.0.

Added decimal to heat fsp in WW string

************************************************************************

V00.3620130213

Had a bug in the recip dec routine that was causing a loop and watchdog timeout.

************************************************************************

V00.3720130213

Fixed the bugs in the lead rotation routine

************************************************************************

************************************************************************

V00.3820130216

In the two equal VFD compressor routine, added a new feature where the lead compressor would keep the liquid line on when the Rdemand fell below 25% and turn off below 15%. This is to prevent cycling.

************************************************************************

V00.3920130219

In the two equal VFD compressor routine, added an overlap between 49% and 53% to keep the compressors from cycling in that area.

Added the pumpdown alarm logic to the regular compressor routine (was just for screw before)

************************************************************************

V00.4020130312

Changed comp overload alarm (cova #40) to trip when input opens

************************************************************************

V00.4120130423

Added a setpoint input mode. When this mode is selected, the Rdemand is calculated with a PID loop comparing the room temp to the temp setpoint (tsp1:tsp2). The room temp is an average of room1_temp (input 44) and room2_temp (input 45). Also added a room_diff parameter. If the two room temps are more than room_diff degrees apart, the temp sensor alarm trips. The TSA also trips if either sensor is o/r.

When in setpoint input mode, fans must be proven (input config = 25)

Added a new output for the analog outputs, output 20. When this is chosen, the Rdemand percentage is put out on the 1-10V/0-20 mA output.

Added a dynamic superheat reset. This required adding two new parameters, des_reset ($61F) and des_reset_tim ($620). When the reset timer (des_reset_tim) > 0, the routine checks if the liquid line is on. If it is, the timer is reloaded and the routine runs as normal. If the ll is off, when the timer runs out (in des_reset_tim hours), the dynamic sh setpoint, des_setpoint, is replaced by the value in des_reset.

On startup, if des_reset_tim > 0, des_setpoint is loaded with des_reset value.

Changed the way I did the flags in the set_flags routine. Before, I was setting or clearing the flag before checking the condition. Then, when checking the condition I would jump a clear or set of the flag if the condition was true. However, it was possible to interrupt in between pre-clearing a flag and checking the conditions. This was causing some random problems. Now I clear or set the flag strictly based on the condition.

Added Condensor Bypass Valve logic. Added a new output bypass valve (cfg = 16) and two new 8-bit parameters, obv_on ($619, param 25)and obv_off ($61A, param 26). If the osa temp </= obv_on, the bypass valve output turns on. If the valve is on and osa temp rises above (or equal to) obv_off, the valve output turns off. If osa temp input is not defined or obv_on and/or obv_off = 0, the valve stays off. The valve also goes off if osa temp is o/r.

Added parallel compressor logic. Added a new output comp2 (cfg = 17) and two new 8-bit parameters, comp2_on ($61D, param 29)and comp2_off ($61E, param 30). If the Rdemand >/= comp2_on, the comp2 output turns on. If the output is already on and Rdemand drops below (or equal to) comp2_off, the output turns off. If the lls or compressor 1 input is not on or obv_on and/or obv_off = 0 or if suction press < comp_off, the output is off.

Moved some parameters out of Bank 4 into Bank 2 since Bank 4 was filling up

Grouped the bank 4 timers together in the one_second_timer routine so I could eliminate the movlb directive every time I decremented a timer

Now, when coming out of startup or shutdown, I look at the Rdemand. If it is over 50%, I set it to 10% and then increment it by 10% every 5 sec until it is equal to the actual Rdemand. This keeps the system from coming on fully loaded.

************************************************************************

V00.4220130516

Added air defrost. The defrost cycles are now secondary modes

Fixed the lead comressor run time so it now correctly saves the time in E2

Changed 2 Equal VFD profile to rotate. Also off mode now counts as an alarm mode in the sense that the master will compensate if any CRX is off

Added electric defrost

Removed the RD command to force defrost and added a new parameter ($662, param 98) that forces the system to defrost if =0. If force_def = 2, the system is prevented from going into defrost.

Changed air defrost so that if the system is in air defrost, it sends out a universal EW command to write a 2 to force_def so the other units can't go into defrost. Once the system goes into coil dry, it write a 0 to force_def so that the other systems can operate normally.

************************************************************************

V00.4320130717

Reversed the logic on the bypass valve on and off points.

************************************************************************

V00.4420130829

Found a bug in the divide168 routine that was affecting the sp_to_count calculations. If the no_round flag was set, the remainder wasn't being saved in d_hi:d_lo. The sp_to_count routine was expecting the tenths to be there so that value was being lost and no tenths were being calculated (or random values were being added to the counts used for the pid control.

*********************************************************************************

V00.4520130924

Wasn't running fan control when in any defrost. Need to run it in air def and elec def.

Wasn't clearing the Rdemand to the slave cards when pumpdown switch activated.

*********************************************************************************

V00.4620130926

When the pumpdown switch is on now, it's treated like a secondary mode to a defrost.

This allows the unit to pump down but still have the slave units still run.

Fixed a math error in the 4-20 mA Rdemand routine that was causing random results.

*********************************************************************************

V00.4720140306

Added a delayed lls output (output config = 18). The delay time is in parameter 94.

*********************************************************************************

V00.4820140404

Enabled the evap fan output (out config = 6). This is on if either the lls or the compressor is on.

*********************************************************************************

V00.4920140422

Changed the low suction alarm so that it checks conditions if either the lls or the compressor is on. Before, it only checked when compressor was on.

*********************************************************************************

V00.5020140430

Fixed the recip staging so that the master adjusted for a card being in alarm or defrost.

Now clear the CStage if any of the compressors change state.

After an air defrost, now don't have to be in coil dry to send out an EW command to clear the force_def E2 spot.

*********************************************************************************

V00.5120140505

Reworked the high dispcharge pressure unload and low suction pressure unload routine to incorporate a second unloader. This unloader output goes off when 10 psi above (or below for lspu) the alarm point and goes on when goes 5 psi below the turn on point.

*********************************************************************************

V00.5220140604

Changed the recips to calculate their own LL and unloaders on/off. The master looks at the number of active compressors and scales the Rdemand across them. It then sends out a 0-100% Rdemand to the active compressors based on rotation.

Changed the single VFD to save Rdemand to VFD_out and then run like a recip.

Fixed the pid_setpoint to work with these changes.

*********************************************************************************

V00.5320140604

Changed the VFD comp profile to work like the recip. The recip saves the Rdemand it gets from the master as the VFD_out instead of getting the VFD_out from the master like other VFD profiles