Important!
The notes below are based on a 1 week factory training course.
Information was provided (at the appropriate time) by the instructor.
If the order is unusual it is the author’s recollection that is a fault.
Below is based on the examination and debugging a Cerebrum system by traditional “software engineering” personnel.
First Impressions:
The application used by the end user is “Cerebrum Designer”, this was being used below.
There are no (specified) per-requisites for programming Cerebrum.
Rather than a page of code you are faced with a graphical macro arrangement.
It is not unlike other purely Drag/Drop GUI development environments.
To (traditional) software people this GUI/API can be a little tricky and probably favors non programmers initially.
The architecture follows the usual approach EVENT / ACTION approach which is straight forward.
The most critical aspects in getting your page/panel/? started are:
1. What am I trying to do
2. Where is the data to achieve that coming from?
3. What EVENT do I need to monitor to obtain the data?
4. Make sure you get your Variable Types correct (see below)
Once you have that figured out you are well on your way.
If it all gets too hard – look at the XML!
Sometimes its easier to get an overall feel for “what is going on” when you can view a large amount of the code at one time.
This is where viewing the XML may assist.
XML is rather “busy”, but once you learn how to ignore most of the structural notation and focus on the data, its quite straight forward.
To obtain an XML version of the current file you simply EXPORT it, by default the XML file is placed in the same directory as the current file.
A little bit of python can clean up and make XML very readable – highly recommended if you use this approach often.
Getting XML to work for you:
Export the file and open the XML using notepad++ for example.
Then compare the XML and with the GUI version in Cerebrum Designer.
Very quickly much of the XML notation will become obvious.
ie. EX, LV… etc are xml code for operations and variables.
Variables:
In the early stages working out variables is probably the most difficult and error prone area.
This is one case where XML can reveal the inner workings clearly.
ie. automatic / local / view / panel / system / global.
A little more on Variables:
The online help files (CHM) are worth reading, they contain some very important points.
Below are a few of the most critical.
The section “Variable Types”.
In a traditional language this would refer to the data type the variable holds or stores, in Cerebrum its where the variable is defined.
Keeping this in mind will save confusion, particularly for “traditional programmers” until they get the hang of it…
The section “Variable Values”.
Read this section in the help file until its significance is well understood, it will save you a lot of time.
Lastly what are all these ****’s about?
They are a warning that what you have coded may not be what you think.
There is an excellent example in the help file.
In the early stages it most likely means you have messed up your Variable Type (see above).