10 - 12 - 2024

System

Block ProcessIsStarted

License: Hobby, Industrial

The block is very important and may be used to delay the start of the operation of some blocks of the diagram shortly after the diagram starts.

Block's parameters:

  • AfterCycles - determines after how many cycles of the diagram execution, the output of the block will become to a high level. The diagram's cycle time is determined by the DiscreteTime parameter of the Process block (in sec);

Block's outputs:

  • Started - becomes at a high level with a short delay after start of the diagram. The delay is determined with AfterCycles parameter;

If the paremeter AfterCycles is 10 and DiscreteTime parameter of the Process block is 0.001, then the output Started will become to hight value after 0.001 * 10 = 0.01 sec.

 

Block Layers

License: Industrial

More about Layers conception can be read here:

https://scada.altonalab.com/index.php/en/conceptions/block-layers-conception

With this block, we can change the current layer at run time of the diagram.

Block's parameters:

  • HideAlwaysVisible - if the parameter is checked, at the DataSet output of the block Layers, the layers with checked column Always visible will be not added;

Block's inputs:

  • InCurrLayer - at this integer input we have to set the index of needful layer;
  • SetCurrentLayer - when this input becomes to a high level, the current layer of the diagram will be set to the layer with index gotten from the input InCurrLayer;

Block's output:

  • Layers - the output is with DataSet data type. It has two columns: Layer (integer), Name (String). The dataset contains the layers of the diagram, so if this output is connected to ComboBox, LisBox or Table control, we can easy change the current layer at run time of the diagram, when we change the selection of the ComboBox, LisBox or Table control;
  • CurrLayer - currently selected Layer;
  • CurrIndex - the index of a currently selected Layer;
  • OnFirstLayerChanged - when the diagram is started, after a short time this output will becomes to a high level for a while, which indicates the current layer is selected for first time;

 

Block Keyboard

License: Hobby, Industrial

The block has a parameter Keys that allows to specify which characters and special symbols to monitor on. For each indicated symbol appears new exit the block. If a keyboard's button is pressed, the output goes into high level for one second. The interface of Keys parameters is shown below:

With button "Add", an ordinary keyboard's alfa-numeric character can be added. It can be combination with pressed Control key. The button "Add special key" allows to add a special keys as keyboard's arrows: LEFT, UP, RIGHT, DOWN...

Parameters:

  • Keys - it allows to add new observed buttons;

 Example of Keyboard block: KeyboardMouse.nsm

 

Block Mouse

License: Hobby, Industrial

The block has an output corresponding to every possible event of the mouse by pressing/releasing or double pressing one of three buttons, move the mouse wheel rotation in forward or reverse direction. Each event leads to passage of the corresponding output in a high level for one second. The mouse move event changes the outputs of the block X and Y to current mouse's coordinates.

 
Parameters: the block has not parameters.

Example of Mouse block is together with Keyboard block: KeyboardMouse.nsm

 

Block FrequencyMeter

License: Hobby, Industrial

The block measures the frequency of an input signal X. The output Frequency is in Hertzs. The parameter CheckIntervalSec is a time period of measurement with default value of 1 sec.

 

Block SystemRAM

License: Hobby, Industrial

The block gives an information about current memory usage of Windows OS and for current application - AltonaLab.exe. If the input GetInfo is connected, then the outputs of the block will be refreshed when the input becomes to High level, in other case the parameter ScanRate of the block will be used - outputs will be refreshed on every ScanRate seconds;

 

Block SystemCPU

License: Hobby, Industrial

The block gives an information about the computer's CPU - it's usage from  Windows OS (output CPUCurrentlyUsed) and from current application - AltonaLab.exe (CPUUsedByCurrProcess). Additional information is shown at block's outputs: Num processors, Clock MHz, Vendor, Processor Name, Processor Identifier.

If the input GetInfo is connected, then the outputs of the block will be refreshed when the input becomes to High level, in other case the parameter ScanRate of the block will be used - outputs will be refreshed on every ScanRate seconds;

Block DiskSpace

License: Hobby, Industrial

When the parameter DiskLetter is set, we can monitoring Total MB and Free MB of the computer's disk. The outputs of the block are in megabytes.

If the input GetInfo is connected, then the outputs of the block will be refreshed when the input becomes to High level, in other case the parameter ScanRate of the block will be used - outputs will be refreshed on every ScanRate seconds;


Block SystemNetwork

License: Hobby, Industrial

With this block, the load of the network can be monitoring by block's output BytesPerSec.

If the input GetInfo is connected, then the outputs of the block will be refreshed when the input becomes to High level, in other case the parameter ScanRate of the block will be used - outputs will be refreshed on every ScanRate seconds;

 

Block OS_Info

License: Hobby, Industrial

The block provides an information about the current version of Windows OS, so we can easy recognize Win XP, Win 7, Win 8, Win 9, Win 10...


Block StartApplication

License: Hobby, Industrial

The block is very powerful and allows AltonaLab to run or restart a Windows application. When the application is started, the block is monitoring the started application and if it crashed, the application will be started automatically again.

Parameters of the block:

  • CommandLine - command line of the started application;
  • FullApplicationPath - path of the application with executable name. For example: c:\Windows\Notepad.exe
  • StartInFolder - the starting folder of the application. For example we can start c:\Windows\Notepad.exe, but starting folder of Notepad.exe can be other folder than c:\Windows\
  • WaitUntilStart - How many seconds to be waited before the start of the application;

 Additional parameters of the block are provided, which increase a lot of quality of monitoring application. At this case the started application has to save an XML file on every few seconds (on every 5..20 sec). The XML file looks like:

<?xml version="1.0" encoding="UTF-8"?>

-<Results>

-<Header>

<ExpDate>20180916 20:36:39</ExpDate>

</Header>

-<Data>

<LastActivity>20180916 20:36:38:0990</LastActivity>

</Data>

</Results>

 

On every new save, the XML TAG LastActivity has to be updated with current DataTime. Then the parameters bellow can be used. If some of them is not set, then this group of parameters will be not activated.

 

  • FullActivityFileName - the file path and name of the XML file, which the monitoring application has to refresh on a few seconds. For example: c:\AltonaLab\AltonaLab.xml

  • CheckLastActivitySec - On how many seconds the Activity file to be checked;

RestartIfNotActivSec If after period of time RestartIfNotActivSec seconds, the XML Tag LastActivity is not changed, this means the monitoring application is crashed or sleeped, then the block will restart it;

Outputs of the block:

  • OnStarted - becomes at high level if the monitoring application is started;
  • OnStopped - becomes at high level if the monitoring application is stopped;
  • NumRestarts - a number of restarts of the monitoring application;



Block KillProcess

License: Hobby, Industrial

The block allows easy to kill (stop) the Windows process. The block has a parameter ProcessName. For example, if the parameter is c:\Windows\Notepad.exe, when the input DoKill of the block becomes to high level and there is started Notepad.exe, this application will be stopped.



Block USBDriveIsConnected

License: Hobby, Industrial

The block shows us if an USB Memory drive is connected or disconnected to the computer. The drive letter of the connected device is shown on block's output Drive.


Block ManageOtherApp

License: Hobby, Industrial

The allows the buttons from other application to be pressed. Parameters of the block are:

  • OtherAppCaption - the text of the caption bar (title bar) of the other application;
  • Button1Caption - the text of the button of the other application. When the input of the block PressButton1 becomes to high value, the button will be pressed. The same is with parameters Button2Caption, Button3Caption;

The button of other application can be pressed by coordinates. At this case, the parameters of the block: ButtonCoordX, ButtonCoordY have to be set. The button by coordinates will be pressed if the input PressButtonByCoord becomes to high value;

The input LogAllAppCaptions writes all the running Windows application's captions to AltonaLab log file. The input LogAppControlsCaptions enumerates all the running Windows applications, then for every application enumerates its controls and writes the control's captions to AltonaLab log file.