I am at home now and my Alpha2 stuff is at work. It may be that I can explain though:
I am trying to control some swimming pool heaters depending on the generation from SolarPV panels on and the amount of energy consumption on site. It is more economic to use the PV generation in the pool heaters than to 'export' it onto the utility grid. I have two analogue transducers measuring PV generation and site consumption. I have three heaters attached to three digital outputs.
So, the easy bit is I can calculate whether the site is exporting energy by subtracting the consumption from the generation. Positive results indicate that we are exporting. Then if we are exporting more than the power of the first heater (24kW)-Turn it on. If we are still exporting more than 24kW turn on the second heater; and so on. I have managed to implement this and the PLC is now running out in the field and performing well (after some modifications; an averaging function on the two inputs and some delays on the heaters turning on/off to reduce chatter on the contactors.
The reason for my initial question was that during the development, I wanted to 'tune' the switching behaviour in the software simulator by adding the increase in consumption as the loads were switched on. Simulated feedback if you like? So when heater1 is turned on 24kW would be added to the consumption input.
So my approach would be that if Heater1 is on, a new calculation is added to the consumption input Cons=Cons-24 I tried to do this by taking the bit output of heater1 to enable this additional calculation. This does work....... until heater1 is turned off, at which point the calculation 'freezes' the value. You cant 'unsubtract' the 24kW when heater1 turns off
Is there a workaround to let me change the values in the calculation?
I am glad you say the Alpha2 is not the easiest to program, I thought I was really missing something when I could not work out how to do this? I have a simular task in the near future. Again involving controlling loads to limit energy export to the Grid. It sounds like I may be better off trying a different PLC. I started already with the Alpha2 though. The new job requires that the permissible export varies (0kw; 30kW and unlimited )depending on time year and the time of day too. I found that the Alpha2 Time FB made it very easy to set when the different permissible values apply. Do the FX have an inbuilt calender/clock function? I was planning on using the PID block and some PWM to fire some SSRs for faster more accurate control of the export (The export limits are contractual in this case)Do you think I am going to struggle with the Alpha to apply the export values to the actual limiting part of the setup?
Thanks again, your help is much appreciated