26 - 09 - 2017

Diagram properties

Properties of the diagram:

Right mouse button click over the diagram opens an interface for diagram properties:

  • CanvasHeight / CanvasWidth - the height and the widht of the diagram;
  • ColorBackGround - color of the background;
  • Grid Height / Grid Width - the height and the width of invisible grid, which is used from all the controls and blocks for alignment.
  • Locked - when this parameter is checked, all the blocks and controls can't be moved with the mouse.
  • LockedCanvasHeight / LockedCanvasWidth - when the diagram is locked, the application uses this parameters to determine diagram's size. This is a tricky way to hide all the blocks and contours which are outside the visible area and only controls to be shown.
  • ZoomFactor - zoom of the diagram;

 

Technical problems

AltonaLab is free for use and the latest release seems stable. I have been using it for several years at home for the house’s Home Automation needs. I have also implemented it at my weather monitoring website where it reads many sensors in real time and then saves their information in an XML file.

 

If you encounter some problems, please, report it.

 

Example diagram with a Button and a Lamp

  • Show the new blocks interface from the main bar.
  •  Select library Controls from the list on the left.
  • Double click on the Button block and then on the Lamp block. At the bottom part, at the diagram two new blocks will appear. Close the interface for adding blocks.

 

  • Show the interface for adding controls from the main bar.
  •  Double clickon the Button control and then over Lamp control. Close the interface.

  • Arrange the position of the blocks and controls on the diagram according to your test case.

  • Click on the output on the right side of the Button block and without releasing the mouse’s button, drag and release the button over input on the left side of the Lamp block. New connection is created.
  • In order to change the names of the controls – right click on the appropriate control, either Button or Lamp, and rename it in Name parameter.

  • Connect the Lamp block with the Lamp control. Right click on the Lamp control. In the Connect to lamp parameter you will see a list of all Lamp control's names (in this case there is only one). Select the Lamp’s name and then click OK.

  • Connect the Button block with the Button control. Right click on the Button control. In the Connect parameter you will see a list of all Button control's names (Currently it is only one). Select the Button’s name and then click OK.
  •  Set parameters of the Process block. We will choose to make a real time model for controlling a slow process. Double click on the Process block and set the following: TimeProcess – without meaning, DiscretTime = 0.1,  RunAlways = checked;
  •  Start the process – press the Start button. If there are no errors the Start button’s text will be changed from Start to Stop. In case of errors, they will be written on the right blue area of the screen and the process will be not started.
  •  Once the process is started we can check how it works. When we click on the Button control, the Lamp should flash.
  • Stop the process – press the Stop button.

 

TCP/IP Server

The application has a TCP/IP Server which makes it a very powerful instrument for remote control and remote monitoring. The server can be started from the TCP/IP Server icon from main application bar. The default port of the server is 707. It can be changed from Settings - TCP/IP Server. All the messages from TCP/IP server are shown on the right blue area with dark blue color.

Up to now two blocks that can work with TCP/IP Server have been developed. They allow the application to obtain information from a mobile phone with Android operating system. This information can be the data from the phone’s sensors, such as orientation, magnetic field, GPS, temperature, etc. An android application with several buttons is represented as a block with digital outputs and is suitable for remote control. The feedback from the SCADA can be sent to the phone as analog signal values. You can find these block in the Android blocks library.

 

When the TCP/IP server starts for first time, Windows FireWall will ask the user for allowance for internet access and the user has to allow it.

 

Starting the process

There are two ways to start the process: 

  • Manually starting the process: by pressing the Start button. If all blocks are connected correctly and there are not errors, when the button Start is pressed its text will be changed to Stop. If there are errors, they will be show up at the blue right area with dark red color and the process will not start.

 

  • Automaticaly starting the process: The file name of the diagram with its path has to be added to the configuration file AltonaLab.ini. The INI file can be found at the same folder, where is AltonaLab.exe:
    [Common]
    Start=C:\AltonaLab\Diagram.nsm
     
  • Automaticaly starting the TCP/IP Server: Just add the key StartTCPServer to Common section in configuration file AltonaLab.ini :
    [Common]
    StartTCPServer=1