• Please visit and share your knowledge at our sister communities:
  • If you have not, please join our official Homebrewing Facebook Group!

    Homebrewing Facebook Group

BruControl: Brewery control & automation software

Homebrew Talk

Help Support Homebrew Talk:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.
For the UniShield, I’d suggest 22AWG. Terminals can go down to 20 but 22 is readily available, has good ampacity to cover what you noted and had good durability. You can use smaller for sensors, like 28 if you want since they don’t carry current. Ethernet cable is ok but I’d avoid solid conductor in favor of stranded.
 
Progress on the AD ProOpen PLC. Have the digital outputs working (red LED).

. 55025F70-5BA5-421C-BC00-7FF7E857323E.jpeg
 
Agreed. We would still support them with jumpers rather than solder pads if we built them into the board.

Regarding 2/3/4 wire operation, Adafruit in their documentation references programming the actual MAX31865 for the type of RTD
1608128032475.png

And the datasheet says to write the D4 bit of the configuration register to match the type of RTD...
1608128266515.png

1608128293957.png


What is the BruControl implementation doing here?
 
Quick question. I am trying to perform so math in the BruControl scripting. I understand you can only do one function at a time? My hang up is trying to multiply a value with an exponent. Example 5^2=25. This format doesn't seem to work in scripting. What am I missing? In my situation the exponent is variable.

Thanks
 
Quick question. I am trying to perform so math in the BruControl scripting. I understand you can only do one function at a time? My hang up is trying to multiply a value with an exponent. Example 5^2=25. This format doesn't seem to work in scripting. What am I missing? In my situation the exponent is variable.

Thanks
To my knowledge, exponent functions are not part of the math library in BC. I had a similar need, so I offloaded that math to another platform via the data-exchange.
 
Quick question. I am trying to perform so math in the BruControl scripting. I understand you can only do one function at a time? My hang up is trying to multiply a value with an exponent. Example 5^2=25. This format doesn't seem to work in scripting. What am I missing? In my situation the exponent is variable.

Thanks

Good one! I will add exponents to the list. This is easy to do. In the meantime, you gotta do it old school. Here is a script example:

Code:
new value base
new value exp
new value result
base = 5
exp = 3
result = base
[exp_loop]
result *=  base
exp -= 1
if exp > 1
goto "exp_loop"
endif
print result
stop "script_name"
 
Quick question. I am trying to perform so math in the BruControl scripting. I understand you can only do one function at a time? My hang up is trying to multiply a value with an exponent. Example 5^2=25. This format doesn't seem to work in scripting. What am I missing? In my situation the exponent is variable.

Thanks
You can do it with a variable or global.

If you have a global value type named: Global Squared

script:
// Set Initial Value
"Global Squared" value = 6
"Global Squared" value = "Global Squared" value * "Global Squared" value
// you can the use the "Global Squared" value for what you want to do with the squared value.

You could put this in in own script:

"Global Squared" value = "Global Squared" value * "Global Squared" value

and just open that script if you are doing this multiple times. You can also get the Initial Value different ways.

What do you need this math for? I have not thought of anything that need squaring a number.
 
Good one! I will add exponents to the list. This is easy to do. In the meantime, you gotta do it old school. Here is a script example:

Code:
new value base
new value exp
new value result
base = 5
exp = 3
result = base
[exp_loop]
result *=  base
exp -= 1
if exp > 1
goto "exp_loop"
endif
print result
stop "script_name"
Thanks I will give this a try!
 
You can do it with a variable or global.

If you have a global value type named: Global Squared

script:
// Set Initial Value
"Global Squared" value = 6
"Global Squared" value = "Global Squared" value * "Global Squared" value
// you can the use the "Global Squared" value for what you want to do with the squared value.

You could put this in in own script:

"Global Squared" value = "Global Squared" value * "Global Squared" value

and just open that script if you are doing this multiple times. You can also get the Initial Value different ways.

What do you need this math for? I have not thought of anything that need squaring a number.
Setting up some carbonation features in my fermentation control. Real time CO2 vols, pressure calculator and auto spunding/ force carbonation. Takes into consideration barometric pressure and specific gravity.
 
Thanks I will give this a try!
I think this will only work for positive whole numbers. The math function I use in excel for example is EXP(-0.069589422) Where -.069589422 will be a variable but likely always a negative decimal variable.
 
Good one! I will add exponents to the list. This is easy to do. In the meantime, you gotta do it old school. Here is a script example:

Code:
new value base
new value exp
new value result
base = 5
exp = 3
result = base
[exp_loop]
result *=  base
exp -= 1
if exp > 1
goto "exp_loop"
endif
print result
stop "script_name"
I think this will only work for positive whole numbers. The math function I use in excel for example is EXP(-0.069589422) Where -.069589422 will be a variable but likely always a negative decimal variable.
 
EXP is the base of the natural logarithm (2.718). Either way, a negative non-integer requires a different approach!
Yes I am aware. My work around would have been to take the constant 2.718^(variable exponent) which like I stated will likely always be a negative non-integer. So I assume this is not possible in BC itself... is there a way to do the math in excel and have the value imported into BC? I guess I'm looking to see what my options are?
 
To my knowledge, exponent functions are not part of the math library in BC. I had a similar need, so I offloaded that math to another platform via the data-exchange.
I have never done this, would this be where I could export variables to excel to do the math and then import the value back into BC?
 
I have never done this, would this be where I could export variables to excel to do the math and then import the value back into BC?
You have the concept, though I don't think Excel is capable of performing the API calls. I use a platform called node-red to pass data back and forth via the data exchange. It requires the Pro license, but it opens up a lot of flexibility. I use it to populate recipe data via a BeerXML file, perform math that BC currently cannot do, bring in unsupported BC devices via Modbus, as well as other miscellaneous tasks.

If you are looking for the carb equation (input CO2 volume desired and temp, returns pressure needed), I have that all worked out in BC with nothing external needed, PM me your email and I'll send you the script for it.
 
I have never done this, would this be where I could export variables to excel to do the math and then import the value back into BC?

As mentioned above something like node red would be more practical than using excel. It is not trivial, but you can use something like perl or python to access excel's API through windows COM servers. Python has a module win32com that allows you to launch excel and attach to its API. You would then need some code to get the data in/out of Brucontrol to bridge the gap. That being said I would never go that route, nor would I recommend it.
 
You have the concept, though I don't think Excel is capable of performing the API calls. I use a platform called node-red to pass data back and forth via the data exchange. It requires the Pro license, but it opens up a lot of flexibility. I use it to populate recipe data via a BeerXML file, perform math that BC currently cannot do, bring in unsupported BC devices via Modbus, as well as other miscellaneous tasks.

If you are looking for the carb equation (input CO2 volume desired and temp, returns pressure needed), I have that all worked out in BC with nothing external needed, PM me your email and I'll send you the script for it.
Interesting, very interesting. Thank you @RiverCityBrewer .
Any recommendation where to start from 0 with node red?
 
The first step would be getting it installed and familiarizing yourself with the layout and add-on modules. If you have a raspberry pi, it is installed by default and really easy to turn on and play with. If you want to install it on Windows (probably easiest to install it on the same machine as BC), I've attached some instructions on how I did it. This includes the node installations required to get the XML data transfer going.

Cheers,
Joe
 

Attachments

  • NodeRedInstall.txt
    625 bytes
I am trying to get my PID working correctly for PWM cooling with water flow via a valve, both PID's shown here are default other than Kp being set to 10, and PID 2 being 'reversed'.

Why is there no action on PID2 when the input crosses the target?

Why is it -255, that seems very unorthodox.

How do I get a properly working PID that will have the out put go *on* when the input goes above the target?

https://www.bitchute.com/video/IS9GHXg8onDw/
 
The first step would be getting it installed and familiarizing yourself with the layout and add-on modules. If you have a raspberry pi, it is installed by default and really easy to turn on and play with. If you want to install it on Windows (probably easiest to install it on the same machine as BC), I've attached some instructions on how I did it. This includes the node installations required to get the XML data transfer going.

Cheers,
Joe
Thank you. JFYI I had to fight with last 2 commands.
 
Back
Top