Controls Common
-
Please, refer to section “Work with controls”
These special blocks has to work together with controls added from the main application bar:
With other words, we need always to have block and control from the same type. The block participates in diagram and is connected with other blocks, the control is the part of an interface, which shows digital or analog signals (XMeter, Scope, TextOut) or allow user to control the current process (Button, CheckBox, RadioGroup...).
Lamp block
License: Hobby, Industrial
The Lamp block has one input. When the input value is changed, the color of the lamp control is changed too. Right click with mouse button over the Lamp control to edit its visual properties:
- On color - the lamp's color in hight input value;
- Off color - the lamp's color in low input value;
- On - inverts the input of block;
- Gradient - works with color gradient or not;
Button block
License: Hobby, Industrial
This block has one output. When the Button attached this block is pushed, the output signal of the block gives high value. If the user click over the button contol with right mouse button, the button's properties can be changed like caption, color and font. If the input Disable is in hight level, its color become grey and the control is not accessable to be pushed.
CheckBox block
License: Hobby, Industrial
There are two blocks, which can be connected to check box control:
- Block CheckBox. This block has one output which corresponds to the state of the attached CheckBox control. Its parameter InitialState determines control's output at first moment, when the process is started;
- Block CheckBoxExt. This is an extended version of the same block. When the input Disable is in hight value, the control is impossible to be checked. If the input SetPushed become to hight level, the state of the control will get value of input InPushed.
XMeter block
License: Hobby, Industrial
The block is suitable for visualization of analog signals in way similar to the old style volt meter devices. Multiple XMeter blocks can be attached to one XMeter control. (In this case it is recommended that every signal is presented with a different color. For that purpose you can use the block’s Color parameter).
Control Parameters:
- Color Arrow
- Color Background;
- Color Font;
- Color Grid;
- Name - the name of the control;
Scope block
License: Hobby, Industrial
This block can visualize signals as graphics and has to be attached to a Scope control. Up to 5 Scope blocks can be attached to one Scope control.
Parameters of the Scope Block are:
- Color – the color of the graphic;
- Max – max boundary of value;
- Min – min boundary of value;
- PointWidth - a width of the drawing poin of the signal in pixels;
Parameters of the Scope Control are:
- Color Background - background color of the control;
- Color Font - color of the texts of the controls;
- Color Grid - color of the grid elements of control;
- Name
- TypeShownTime- describes the parameter TimeShownProcess. The possible values of TypeShownTime are:
- From process - in this case, the parameter TimeShownProcess is without meanings, the time of the shown process in Scope control will be gotten from block Process, property: TimeProcess;
- Seconds - this means that the time of the shown process in Scope control will continue as many secconds as they are set in TimeShownProcess.
- Minutes - the same as Seconds, but the time is set in minutes.
- Hours - for long process, the time of the control can be set in hours.
TextOut Block
License: Hobby, Industrial
This block can visualize analog signal as text.
The TextOut block does not have parameters but TxtOut control has several which are accessible via a right click over it:
- Color Text – the color of the text;
- Color BackGround - the background color of the text;
- Format Text – this is the way to show the input value as text. Default value of this parameter is “Value=%0.3f [mV]”m which means that there is a prefix before the value with text “Value=”, suffix after value with text “[mV]” and the format of the text in the middle where analog signal with be converted to text. %0.3f means that analog value will be shown with 3 decimals. %0.5 will show 5 decimals. Please do not use other formating text like %s, %d, they can damage running of the process.
- Font – all the font parameters can be edited from here – font size, font name, bold, underline, etc.
- Transparent – weather the text will be on a transparent background or not;
- Name –the name of control;
TextOutStr Block
License: Hobby, Industrial
This block is similar to TextOut block and can visualize string input signal as text. The different is only parameter Format text of the control. Default value of this parameter is "Value=%s", which means that the string from block's input will be replaced where is %s. For example, if the Format text is "My name is %s and I live in London." and input of the block is Albert, then the TextOutStr control will show "My name is Albert and I live in London.". Please do not use other formating text instead %s. For example %d, %0.3f can damage running of the process.
TextOutInt Block
License: Hobby, Industrial
This block is similar to TextOut block and can visualize integer input signal as text. The parameter Format text of the control has a default value "Value=%d", which means that the input value of the block will be replaced where is %d. For example, if the Format text is "Gate number: %d" and input of the block is 5, then the TextOutInt control will show "Gate number: 5". Please do not use other formating text instead %d.
TextOutUni Block
License: Hobby, Industrial
The block can be used when it is necessary to form complex texts whose content depends on more than one block inputs. For example, we want to show the temperature in a certain city by a certain date.
At parameter Inputs we have to add Temp with analogue type, Town with string type and Date with DateTime type.
At Text parameter to set a text, which contains tags with block's inputs names:
<Date;dd MMM yyyy hh:mm:ss>, the temperature at town <Town> is <Temp;2>
The block will replace every tag with its contents using Text formating strategy:
https://scada.altonalab.com/index.php/en/scada-design-mnu/text-formatting-strategy
For example the tag <Temp;2> will be replaced with value of the input Temp with two digits after decimal separator.
The block has to be connected with TextOutUni control by parameter: Connnect to TextOutUni.
RadioGroup Block
License: Hobby, Industrial
The control RadioGroup has 8 parameters Item1..Item8 (rigth mouse button click over control), each of them corresponds with block's output SelectedItem. Every control's parameter Item1..Item8, which has a text will appears with the same text in RadioGroup control. If the Item has no text, it will not appears in the control. When the process is started and the user select one of the item in RadioGroup control, the output SelectedItem will get its index and the output OnSelChanged will become to hight value for one second. The block has a few inputs, which can be not connected. If the input SetSelItem become to hight value, the control will change it's selected item with this one, which corresponds with value of the input InSelItem. Hight value of Disable input will stop mouse activity access to the control. The parameter InitialState of the block, determines the selected item at first moment, when the process starts.
Control Parameters:
- Caption - the text of the top of the control;
- Color Frame;
- Color Ground;
- Color Text;
- Item1..Item8 - correspodns to shown items of control and outputs of the block RadioGroup;
Conect Block
License: Hobby, Industrial
A simpe way to simulate production line is Connect control. The block has one digital input. When it become to hight value, the color of Connect control is changed.
Control Parameters:
- Color On - the color of the line when the input of block is in hight value;
- Color Off- the color of the line when the input of block is in low value;
- Color Outline - the color of the line boundary if the parameter Outline Width is greater than 0;
- Line Width - the width of the line. It has to be between 1 and 40 pixels;
- Outline width - the width of the outline boundary of line;
- Paint type - this parameter determines the pattern of the line. It can be solid or a few types of hatched lines.
Example of Connect control: Connect.nsm
Edit Block
License: Hobby, Industrial
This control allows float point or text value to be entered into the SCADA diagram. The block has two outputs: Number - gets the analog value of the entered text in the Edit control, Text - gets the text value of the control as string. For example if the control's text is 123.45, the Number output will has analog value = 123.45, the Text output will has 123.45 as string, but if the text of the control is London, then the text will be converted to 0.0 analog value of Number output. The Text output will has London string value.
The block has two inputs:
- Disable - the hight value of this input disables the control and it is imposible its value to be changed.
- Release - this input is very important! If the input is not connected, when the text in control is changed, its value immediately are released to its outputs. If the user tries to enter the value 1000.0, he/she will enter first digit 1, the output will become to value 1, then the user will enter 0, the output will become to value 10... then 100, then 1000. Other problem is that the user can make a mistake and after seconds can fix it. In real time system this effect can damage our machine. So if the input Release is connected, only when the input become to hight value, the text of the control will be converted to its analog value to the output Number and will be set to the string output Text.
Exampe of Edit control: Edit.nsm. There are two Edit controls. The left one is with release input connected. The second edit has not Release input connected and its value immediately is set to its outputs.
ScrollBar Block
License: Hobby, Industrial
The block has one analog output, which represents the value of ScrollBar control.
Control Parameters:
- Min - the minimal value of the control's output;
- Max - the maximal value of the control's output;
- StartPos - This is starting value of the ScrollBar control, when the process is started. The value has to be between Min and Max control's parameters;
- Line Width - the width of the line. It has to be between 1 and 40 pixels;
- Step - control's output will be changed with this step, when the scroll bar is changed. ;
- Vertical - by the default, the ScrollBar control is horisontal. For vertical control, check the parameter.
Example of ScrollBar control: ScrollBar.nsm. Start the process and change the position of the Scroll bar control, its valus will be shown on Scope control.
Table Block
License: Industrial
One of the most interesting control of course is a Table. Every contrl's column can be with different type: analog, digital, integer, string. The table's contents is stored at text file. The block has a parameter Table, which opens an interface for editing table's column and contents. When the columns are added, the user can add rows. Editing the cell of the grid can happen with mouse double click over the cell. Every added columns will appears as output of the block. File name where the contents is stored and character for columnd separator can be set from the same interface.
The block has a few inputs:
-
SelectedRow - the position of new selected row;
-
SetSelectedRow - when the input become to hight level, the current row will be changed with possition from input SelectedRow;
-
GoTop - select the first row of table;
-
GoBottom - select the last row of table;
-
Reload - load again the content from a text file;
-
FileName - name of the text file can be set from external block;
-
SetFileName - when the input become to hight level, the file name of the block will be changed with the value of the input FileName;
-
Disable - when the input is in hight level, the control is disabled;
Outputs of the block are:
The table's contents can be edited with mouse double click over the table too.
Example of Table control: Table.nsm.
Block CircularGauge
License: Hobby, Industrial
The block gives us a nice way to show one or more analog values in circular gauge. All the control's settings are accessable from parameter of block CircularGauge: GaugeSettings. The user can change color themes of the control, shape, tick mark and label appearance. Many gauge's pointerscan be added. Each pointer appears as analog input of the block. The contol has abilities for color ranges.
Block LinearGauge
License: Hobby, Industrial
With LinearGauge block, the user can show one or more analog values in Linear gauge. All the control's settings are accessable from parameter of block LinearGauge: GaugeSettings. The user can change color themes of the control, vertical or horizontal rientation, tick mark and label appearance. Many gauge's pointers can be added. Each pointer appears as analog input of the block. The contol has abilities for color ranges.