I see in your sample code that you insure devices are off. Is there a reason? Are devices all not enabled when you close a brew day. Maybe a good idea at the end of a script to
State = Off
Enable = False
on all devices.
[prep_fill] Status = "Prep Fill" restart "Step" restart "Master" "Valve 1" State = on "Valve 2" State = off "Valve 3" State = off
in your sample code you have the following:
"Water Input" Enabled = false
"Boil Temp" Enabled = false
"Chill Temp" Enabled = false
"Chill Flush" Enabled = false
"Panel Alarm" Enabled = true
What type of devices are these. I figured out that something like "RIMS Heat Duty" was a Digital i/o as Duty Cycle Control. The ones above I am not sure about.
"Water Input" makes me want to say the is a Device Type = Variable.
Likewise, "Boil Temp" could be a Variable or a Probe.
Same could apply to "Chill Temp"
I have no idea what "Chill Flush" would be.
The "Panel Alarm"?
These are all device elements. Note the names shouldn’t really matter to you as they apply to this particular system - you can pick whatever names you want for your device elements.
“Water Input” is a Digital Output device. You can enable or disable these. It could not be a variable because you cannot enable or disable those.
I suggest you spend some time with the manual to see what elements have which possible properties. Not trying to be snarky, but I think you’ll understand BC a little better from the documentation at first before tacking example scripts.
I have read the user manual at least 10 times. I quite understand what a Device Element is. I understand the “name” and most other attributes of a Device Element. I have placed Device Elements like a Digital Output and lit an LED on my Tester PCB (just a bunch of LEDs) manually. I have written very simple scripts to change the state on Element.
- I was was not asking about the “name” of the Element, but its type.
- I ask about variable because there is a Device Element type Variable.
you might not have recognized the “name” that I was asking about but they are from your sample code. I had deduced that they were Device Elements because your code used the “enable” attribute which is NOT and attribute of a declared variable.
What at I am trying to do is “recreate” your code with your workspace. If I copy your code and add it to a script, it will not work if it does not find the required Element. In fact, I was using the Error code to add forgotten Elements to the workspace.
it would make a difference as to the Device Type if your code was looking for. a Digital Input (like “Water Input”) and I created a Device of that name as. Digital Output. I was assuming that you could use a Device Element type Variable to get an input into the code.
So so having the Device Element Type is crucial in building a model from your code. With my test PCB I have switches, LEDs as Digital Outs, One Wire Temp Probes and even a small cup heater attached to an SSR. I could likely duplicate a model brewery based on your code (except Analog Inputs but I could do a work around those)
That was why I ask the question.
No, not yet. We will be creating a “Communication Element” where you can pass information through different connections.
That said, and while we want to give our users flexibility, I have to mention that the intent of BC is to eliminate dead-end and dedicated hardware. Buttons, switches, PIDs, etc. The digital control panel gives the most freedom to customize the user interface as you like. For example, you can create these style PID displays on your workspace.
Yes you can use virtual items. But I also like Physical Gauges near my vessels. That is somewhat why I like a Physical Button vs a Virtual one. I have 5 physical buttons I can press on my Brewery wall that do things. For example, I have my strike water ready based on Temperature. I add my grain. I want to start my modified HERMS circulation. I could use a Virtual Switch or Button, but my hands are dirty or I am wearing heat proof gloves. I can press a Physical Button. It is near my brewery while the screen may be across the room. I understand the concept, but having Physical Devices in addition work very well for me.
If you change the Name Property of an Element, the change is not refreshed on the screen
"Timer 1" Name = "Hops"
//this works fine, but the "name" on the screen is "Timer 1"
// ....do other things with the Hops Timer until I am done, then
"Hops" Name = "Timer 1"
I was thinking that I could change the Name of a Timer to reflect what the timer was counting or doing.
I know I could just add another Timer Element but I was trying to un-complicate the Workspace where I did not have 8 Timers on the Workspace. I know you can use the Visible Property but when build a Workspace it gets to be "Who's on first" becuase of all the Elements on the screen.
The name is reflected if you close BruControl Application then reopen Refresh (CTRL_F5 or CTRL _SHIFT_ R) does n0t refresh either.
It is refreshed if changed manually using the "Circle I" Device Dialog.
A nicer feature would be able to have a new Property "Text Displayed" for Elements that is only a Screen Display where the Name is now. Changing the new "Text Displayed" Property would change the "Timer 1" displayed to "Hops", but the Name Property would remain "Timer 1". That way, you could always use "Timer 1" in the scripts.
As I said in my post, it is not the "live" clutter but the "building clutter". Minor issue but there are many ways to skin a cat.
The issue is that you can only have one instance of a Port and Type.
On a Mega 2560
If I select Port 39 and Type Digital Out Named Blue Pump, I cannot create a Port 39 Type Digital Out on a different Workspace, regardless of a unique name. Once a Port Port Type combination is used, it is fixed, and only available on the Workspace where it was created.
For that reason, it becomes necessary to build a brew day generally on a Single Workspace with all the Elements you need.
By that I mean like trying to create a Workspace for each Major step in a Brew Day:
Since Strike, Mash, and Sparge all use my "Blue Pump", they must be on the same Workspace.
There are some widgets that I use for almost every major step. I am still planning how my Workspaces will look and what I can divide. For example, I will have a Workspace named "Water" where I control valves for both my tap water and HLT flow. Although I would not be able to see the flow of the HLT during a Strike Step (unless I tabbed to Workspace Water), I do not care (I have a Voltmeter and LED Pushbutton on a Panel that shows it is flowing). That unclutters a lot. I will likely use the Visibility property to do what I need on other Workspaces.
Part of the issue is from the BCS world where there are separate Processes. They are very limited as the only have 8 with eight steps each. I guess that there are unlimited steps with BruControl.
I discovered this as I write some simple script to see what it does. If the name change was refreshed, you reuse a Timer or Alarm. I was not thinking of re nameing any device Elements.