Adjustable duty cycle and temp setpoints

Describe your system and processes, and post your config file.
User avatar
Baron Ken
Posts: 99
Joined: Fri Jan 15, 2010 2:50 pm
Bot?: No

Adjustable duty cycle and temp setpoints

Post by Baron Ken »

I haven't brewed since last November and haven't messed with my BCS since then as well, so I had to spend a couple days getting back up to speed on changing the HMI, etc. :)

I made some more changes to my external.js file so that now I can make changes to the duty cycle and temp setpoints while processes are running (without leaving the Main Control page!). I had to overload the update_prop function and added a couple more functions, but I now have it working in a passable manner and am happy for now.

First is an example with no processes going...http://dl.dropbox.com/u/2381014/BCS/processoff.jpg Under Current State Properties, the Temperature Setpoint area looks normal.

But start the process and...http://dl.dropbox.com/u/2381014/BCS/tempset.jpg I added buttons for +1,-1,+5,-5, but I could have easily made them whatever values I wanted.

For a duty cycle example...http://dl.dropbox.com/u/2381014/BCS/dutycycleset.jpg I only added +5% and -5% as those will meet my needs (I may add +/- 10% buttons as well).

I haven't tested the buttons for anything other than PID setpoint and duty cycle.

Note that when the duty cycle or temp setpoint is changed, it saves that change in the process. This was necessary because if you go to a different page than Main Control and then come back, it reloads the stored process values.

I have made a LOT of changes to the external.js file and have overloaded several functions, so if you try to use any part of my external.js, BE CAREFUL!! http://dl.dropbox.com/u/2381014/BCS/BuckBrewing.js
The new stuff are the functions: update_prop, dutycyclechg and tempsetpointchg (all near the end of the file).
JonW
Site Admin
Posts: 1726
Joined: Sun Jul 18, 2010 7:51 am
Bot?: No
Location: Huntington Beach, CA
Contact:

Re: Adjustable duty cycle and temp setpoints

Post by JonW »

Nice job Ken. Those are very nice customizations.
User avatar
Baron Ken
Posts: 99
Joined: Fri Jan 15, 2010 2:50 pm
Bot?: No

Re: Adjustable duty cycle and temp setpoints

Post by Baron Ken »

Thanks. I first tried to figure out how to get a button into a widget, but had no luck, so then I went with changing the innerHTML of the Current State Properties. I would have liked to have used a small up/down (spinner) control, but the buttons will work for now.

I still need to try to figure out how to use a custom index.html page (and other custom pages possibly). I'll get around to messing with Fiddler one of these days ;)
JonW
Site Admin
Posts: 1726
Joined: Sun Jul 18, 2010 7:51 am
Bot?: No
Location: Huntington Beach, CA
Contact:

Re: Adjustable duty cycle and temp setpoints

Post by JonW »

Fiddler is really only a couple minute setup. The ability to serve up a fully customized index.html file really opens up the customization options.
JonW
Site Admin
Posts: 1726
Joined: Sun Jul 18, 2010 7:51 am
Bot?: No
Location: Huntington Beach, CA
Contact:

Re: Adjustable duty cycle and temp setpoints

Post by JonW »

Ken, I have posted a link to my files in this thread:
http://www.embeddedcc.com/forum/viewtop ... 3685#p3685

Maybe that's enough to get you going with the customized html.
User avatar
Baron Ken
Posts: 99
Joined: Fri Jan 15, 2010 2:50 pm
Bot?: No

Re: Adjustable duty cycle and temp setpoints

Post by Baron Ken »

JonW wrote:Ken, I have posted a link to my files in this thread:
http://www.embeddedcc.com/forum/viewtop ... 3685#p3685

Maybe that's enough to get you going with the customized html.
Thanks Jon, heading there now. :)
clearwaterbrewer
Posts: 383
Joined: Wed Feb 09, 2011 3:43 pm
Bot?: No
Location: Clearwater, FL
Contact:

Re: Adjustable duty cycle and temp setpoints

Post by clearwaterbrewer »

Ken -

This is SWEET!... Really the only issue I had with my processes was being able to adjust temp and duty cycle on the fly... THANKS!

Now if we can get a display that looks like a PID, and have these adjustments be sent via a switch on the I2C wires... we will rule the universe!
clearwaterbrewer
Posts: 383
Joined: Wed Feb 09, 2011 3:43 pm
Bot?: No
Location: Clearwater, FL
Contact:

Re: Adjustable duty cycle and temp setpoints

Post by clearwaterbrewer »

Oh, one thing... when making changes, how long does it seem to take, and is there a period where the output is full-on? I have experienced a boilover when I went into the other room to lower the duty-cycle, the only idea I have is that something got stuck in the 'on' portion of duty-cycle that it was in for 5 seconds or so while the change was going into effect.
User avatar
Baron Ken
Posts: 99
Joined: Fri Jan 15, 2010 2:50 pm
Bot?: No

Re: Adjustable duty cycle and temp setpoints

Post by Baron Ken »

clearwaterbrewer wrote:Now if we can get a display that looks like a PID, and have these adjustments be sent via a switch on the I2C wires... we will rule the universe!
I had done a PID display before (http://www.embeddedcc.com/forum/viewtop ... =507#p2964 scroll down to bottom of post). I don't know if that's what you are looking for though. Are you wanting the 'PID' to display the duty cycle?

As for the I2C(?) wires, I'm not sure what you mean. Do you mean being able to make adjustments using the DInputs? It would require 2 Dins and probably have to overload a function call to get it to do what you want (sounds doable though). Elaborate some on what you want and maybe I can help. ;)
User avatar
Baron Ken
Posts: 99
Joined: Fri Jan 15, 2010 2:50 pm
Bot?: No

Re: Adjustable duty cycle and temp setpoints

Post by Baron Ken »

Baron Ken wrote:
clearwaterbrewer wrote:Now if we can get a display that looks like a PID, and have these adjustments be sent via a switch on the I2C wires... we will rule the universe!
I had done a PID display before (http://www.embeddedcc.com/forum/viewtop ... =507#p2964 scroll down to bottom of post). I don't know if that's what you are looking for though. Are you wanting the 'PID' to display the duty cycle?

As for the I2C(?) wires, I'm not sure what you mean. Do you mean being able to make adjustments using the DInputs? It would require 2 Dins and probably have to overload a function call to get it to do what you want (sounds doable though). Elaborate some on what you want and maybe I can help. ;)
Ok, after checking out the Wiki some, I see that I2C is the bus used for expansion cards/7 seg displays. :oops:

So, I'm guessing what you are wanting is the BCS to be able to read the SV value from an adjustable PID display using the I2C bus?
Post Reply