Mikrodiagram User Guide2

From Mikrodev Documentation
Jump to navigation Jump to search



Mikrodiagram is an editor software for used programming of Mikrodev PLC family devices that developed by Mikrodev. Mikrodiagram provide to you perform very complex projects quickly with a visual and easy-to-understand interface.

Mikrodiagram library keep advanced blocks that will facilitate complex aplications such as “PID, astronomical timer” as well as basic logic blocks like “AND, OR, XOR”.

Settings such as program installation and update, online monitoring and firmware update are presented in Mikrodiagram by connecting to devices via different interfaces(USB/TCP).

  1. SETUP

Minimum computer requirments for Mikrodiagram setup:

Operating system: Microsoft Windows XP/Vista/7/8/10/12 (32/64 Bit), Linux İşlemci: 500 Mhz

RAM: 512 MB

Video Card: 128 MB

Disk Area: 200 MB#


Mikrodiagram software is designed to work with current Windows versions. The installation file can be downloaded free of charge from the following internet address:


Mikrodiagram setup is completed by following the directions on the screen.#


STM Processor USB driver installation file…………………… can download in internet adress.

USB driver setup is completed by following the directions on the screen.

Note: There is no need to install a USB driver when a Mikrodiagram is installed on a computer with Windows 10 or higher operating system.

  1. = INTERFACE =


In Mikrodiagram menu options "File, Edit, Build, Tools, Window and Help" menus are available.

File:Resim 3.png#

      1. File Menu

Basic program filing operations can be done from the mikrodiagram file menu.

File:Resim 2.png

File menu options are described on the tablature.

File Name Explain
New File or Project Used to create a new project file.
New File or Project... It is used to open projects with the previously created "mdvpro" extension.
Open File With Used to open files in different formats.
Recent Projects Projects that have recently been processed can be displayed and opened.
Sessions Used to open saved sessions.
Session Manager Used to add new sessions and make changes to existing sessions.
Close Project "first project" Used to close the selected project.
Close All Projects and Editors It is used to close all open projects.
Save “main.mdv” It is used to save changes made to the open ".mdv" file.
Save “main.mdv” As It is used to save changes made on all open projects to their own files.
Save all It is used to save changes made to the open all project.
Revert "main.mdv" to Saved Used to reload the selected ".mdv" file.
Close“main.mdv” Used to close the selected ".mdv" file.
Close All Used to close all ".mdv" files.
Close Others Used to close the unselected ".mdv" file.
Close All Except Visible Used to close files outside of the visible ".mdv" file.
Print It is used to print the prepared ".mdv" file with PDF, PS or physical printer.
Exit Used to close the Mikrodiagram.


      1. Edit Menu

File:Resim 4.png

Edit menu is used for undoing the operation, restoring the undo operation, renaming, cutting, copying, pasting, and selecting all operations.#

      1. Build Menu

File:Resim 5.png

The Build menu is used for compiling the project.

      1. Tools Menu

File:Resim 6.png

From the Tools menu, you can access the Mikrodiagram interface configuration settings and the "Mikroterminal" program where the USB serial port device settings are made.#

      1. Window Menu

File:Resim 7.png

Window menu is used to Mikrodiagram make to design window settings. There are features such as full screen, sidebar display, mode selector display, screen splitting in various shapes

      1. Help Menu

File:Resim 8.png

From the help menu you can access the mikrodiagram "help text" and "about Mikrodiagram" options.

File:Resim 9.png

Information on the Mikrodiagram software version can be found on the "About Mikrodiagram" tab.


File:Resim 10.png

In the status bar you can select the mode "move object, link object, add object, add text, add line tag, group blocks, save, save as, diagram settings, zoom in, zoom out,”.

The memory space used is also observed from this section.#

      1. Object Move Mode

File:Picture 24.png

It is the mode selection used to move objects in Mikrodiagram work area.#

      1. Object Connect Mode

File:Picture 23.png

It is the mode used to connect objects together in Mikrodiagram work area.#

      1. Object Add Mode

File:Picture 26.png

It is the mode used to insert object in Mikrodiagram work area. When selected, inserts the last selected door type when clicked in Mikrodiagram work area.#

      1. Text Add Mode

File:Picture 28.png

It is the mode used to insert word note in Mikrodiagram study area.#

      1. Add Line Label

File:Picture 30.png

It is the mode used to insert line tag in Mikrodiagram study area. The line tags provide a convenient way of connecting the output of doors with "line identification" on door types to the entrance of other blocks. Mikrodiagram provides ease of reading and following of projects.#

      1. Group Blocks

File:Picture 32.png

The projects prepared in the mikrodiagram work area are used in groups. Provides ease of reading and following the projects.#

      1. Save- Save as

File:Picture 35.png

On the mikrodiagram, "Save" to save changes made to projects and "Save As" to save projects in a different folder.#

      1. Diagram Setting

File:Picture 37.png

On the mikrodiagram, it is the mode selection used to adjust the dimensions of the work area to which door types can be added.#

      1. Zoom In-Zoom Out-Reset Zoom

File:Picture 39.png

On the mikrodiagram, used to zoom in and out of the work area to which door types can be added and to set them to the initial settings.#

      1. Find

File:Picture 41.png

On the mikrodiagram, it is the search engine used to find door types or line tags on prepared projects more easily with "block name, block number, modbus address, line description and line tag" filters.#

      1. Used Memory

File:Resim 11.png

On the mikrodiagram, the memory area to be used is observed when the prepared projects are uploaded to the device.#


File:Resim 12.png#

      1. Gate Editor

File:Resim 31.png

On the Mikrodiagram, it is mode of project preparation. #

      1. Projects

File:Resim 45.png

"Device configuration, PLC and extensions, text table, block properties table, variable address table, display options and IEC61850 table" options.#

      1. Simulation

File:Resim 36.png

On the Mikrodiagram, provide you to test the prepared projects in offline mode without loading the device and examine the program responses.

      1. Oline View

File:Resim 38.png

It is used to track block values and load new values into blocks by USB or TCP connection to the Mikrodiagram project loaded on the device


File:Resim 43.png

Build mode options can be switched to "connect / disconnect device, compile project, send to binary device, send project to device and project selection" modes.#

      1. Device Connetion/ Disconnetion

File:Resim 44.png

Used to establish a connection between the device to be programmed and the computer. USB or TCP port connectivity options are available.#

      1. Build Project

File:Picture 61.png

On the Mikrodiagram, it is used to compile the prepared project.#

      1. Send Binary to Device

File:Picture 62.png

Used to send binary files to the device.

      1. Send to Device

File:Picture 63.png

Used to send the prepared project to the device.#

      1. Project Selection

Picture 65.png

On the Mikrodiagram, if more than one project is open it is used to select the project to be sent to the device.


File:Resim 48.png

You can switch to the "door types, line tags, block packages, projects, open diagrams and file system" modes from sidebar options.#

      1. Gate Types

Picture 49.png

On the Mikrodiagram , in order to select the blocks used for FBD programming and move the blocks to programming age, it is necessary to select "Gate Types".#

      1. Line Labels

File:Picture 50.png

While "line labels" is selected in the sidebar, "line definitions" defined in the Mikrodiagram can be displayed and used in the project.

      1. Projects

File:Resim 126.png

While "line labels" is selected in the sidebar, open projects are displayed, and projects are selected.#

      1. Split

File:Resim 129.png

File:Resim 52.png

It can be divided into sections using the "split" option to select more than one mode in the sidebar.= MIKRODIAGRAM CONFIGURATION =

File:Resim 53.png

Mikrodiagram configuration can be accessed by clicking on "Options" on the "Tools" menu. "environment, text editor, diagram editor and version control" are available.#


File:Resim 54.png

On the environment tab, there are "general, keyboard, external tools, MIME types and locator" options.#

      1. General

File:Resim 55.png

File:Resim 56.png

From the General tab, the Mikrodiagram interface color can be changed and the color settings can be reset. (Return to factory settings.)

File:Resim 57.png

Mikrodiagram have Turkish and English languages options.

File:Resim 58.png

If the files are changed from the outside in the Mikrodiagram, the application status of the changes is checked.

Mikrodiagram needs to be restarted when selecting between language options.

File:Resim 59.png

When it is desired to automatically save changes made to the project in the mikrodiagram, the "modified files can be saved automatically" can be selected and the time interval to be saved can be specified.#

      1. Keyboard

File:Resim 60.png

It provides access to the factory settings of the shortcut keys used in the mikrodiagram on the keyboard tab.

The shortcut key settings can be changed and the factory default settings can be restored.#

      1. External Tools
      2. MIME Types
      3. Locator



File:Resim 64.png

The current status of the fonts used in the Mikrodiagram is displayed.

With the font&colors, behavior, display, generic highlighter, snippets, completion options, the appearance of the text editor can be edited.


File:Resim 68.png

It is used to make settings for Mikrodiagram background color, block color, page size and USB port selection

File:Resim 69.png

It can be adjusted by selecting color from "background color" section in Mikrodiagram.

It can be adjusted by selecting color from "block color" section in Mikrodiagram.

Page sizes can be set to any size.

File:Resim 70.png

It is used to make COM port selection from Mikrodiagram to serial port connection to device.

File:Resim 71.png

The "logging" to save newly created projects is selected.

      1. General

File:Picture 51.png


      1. Subversion

File:Picture 104.png


The following steps are followed to create a new project in Mikrodiagram.#


File:Resim 72.png

To create a new project in Mikrodiagram, select "New file or Project open " in the "File Menu".#

      1. Step 1

File:Resim 73.png#

      1. Step 2

File:Picture 130.png

The newly created project name and project creation place are selected

When "Use as default project location" is selected, project creation place is fixed for the projects to be created later.#

      1. Step 3

File:Picture 132.png

Programming method selection is done.#

      1. Step 4

File:Picture 133.png

The device to be programmed and the expansion unit if required are selected.#

      1. Step 5

File:Picture 134.png

Project configuration settings can be changed.#

      1. Step 6

File:Picture 135.png

A new project has been created.

Project design can be started on the page opened by clicking on the file "main.mdv".= USING EDITOR =


Mikrodiagram-specific FBD (function block diagram) can be programmed with door types keep in the programming library

File:Resim 1.png

"Gate Types" are selected from the sidebar and the door type to be added is selected.

File:Resim 13.png

The door type to be added is clicked, then the door type is moved to the work area when it is clicked on the work area. The input and output of the added blocks are connected to each other and the design of the project is continued.#


In projects of Mikrodiagram can be made programming by connecting block outputs to inputs of other blocks.

Another way to connect block outputs to the inputs of other blocks is to add a line label.

Any block named "line definition" can be used as a line tag when connected to a block.

Line labels facilitate the preparation of projects and increase the readability of the projects.#

      1. Step 1

File:Resim 15.png

To move any block output to another point with a line tag, double-click on the block to access "object properties". The "line description" tab in the object properties is clicked, and a description is written in the line tags.

      1. Step 2

File:Resim 16.png

The "line tag" is added when clicking on the "add line tag" icon in the mikrodiagram status bar and then clicking on the work area. The output of the line tag is connected to the block input, as is the method of connecting the blocks together.#

      1. Step 3

File:Resim 17.png

Double-click on the line label to select from line definitions.#

      1. Step 4

File:Resim 18.png

Another way to add a line tag is;

The "line tags" are selected from the sidebar. A "line tag" can be added to the work area by selecting from the line definitions defined in the project.

There is also a filtering feature to choose from line tags.


It is used to add notes to project creation area in Mikrodiagram. The fonts and background of the added notes can be changed.

File:Resim 19.png

If you click on the "insert text" button in the mikrodiagram status bar and then click on the work area, the memo page to be added is moved to the work area. The notes can be written on the note sheet. Font, color, background etc. to change the settings right-click on the note and make selection.


Mikrodiagram block grouping feature; it facilitates the follow-up of the functions of the block groups in the projects.

File:Resim 21.png

Click on the "Block Group" icon in the status bar, then the blocks are grouped in the work area using the select-and-drop method.

The block grouping properties page is reached by double clicking on the block grouping.

The name of the block group is defined by "group title" option.

With the "Look" option, the background of the block group (transparent background or rectangular line) is selected.

With the "Color" option, the desired color selection is made for the block group.

The size of the block group is adjusted by "Size" option.

In the "Behavior" option the selectivity status of the block group is determined


In mikrodiagram, it is used to adjust the dimensions of the pages on which the projects are created.

File:Resim 22.png

In the diagram settings, page sizes can be selected from standard A3, A4, A5, A6, as well as making custom settings for the programmer.


File:Resim 25.png

In the "gate editor" section of the mode options, the project creation page is accessed#


File:Resim 27.png

Block properties are reached by right clicking on the blocks added in the mikrodiagram. Block features include "object properties, cut, copy, delete, align horizontal, align vertical " properties.

      1. Object Properties

File:Resim 33.png

In the block object properties, there are "parameters, line definition and notes" windows.

      1. Parameters

The parameter definitions are explained in the table.

Parameters Explanation
Block Name Holds the block name abbreviation of and number information.
Register Initial Value Used to make block custom settings. (There are different parameters depending on the characteristics of the blocks.)
Persistence If the device is restarted for any reason, it will keep the last data. The persistence parameter is in the "register, table and counter" blocks.
Load Initial Value Persistence is significant for active situation.When a project is loaded for a variable whose persistence is active;if beenselected, the first value loaded with the block is overwritte with the value stored with persistence. If not selected, the value retained with persistence is preserved.
Add to log-record memory It is used to save the block data to the log memory at the specified trigger times.
Sync with DevNET It must be selected if the block is used with the DevNET communication protocol.
No View (LCD and WEB interface) It should be selected so that the block name and its value are not displayed on the screen in the devices with LCD screen or WEB interface.
View Only (LCD and WEB interface) LCD screen or WEB interface, the block name and value should be selected for monitoring from the screen. The "line definition" should be added to the block name to appear on the screen.
View and Set (LCD and WEB interface) In devices have LCD screen or WEB interface, if want displayed and changed on screen for block's name and value, it is should be select.The "line definition" should be added to the block name to appear on the screen.
      1. Line Definition

Block outputs are used when you want to be identified by a name determined by the programmer. Line definitions have multiple uses.

1 - The "line definition" is used in the blocks where the outputs are to be connected with the "line label" to the entrance of another block.

2 - If the block value is to be monitor and changed from devices with LCD screen feature or WEB interface."line definition" should be added

3 - If the blocks in the Mikrodiagram will be defined in the "variable address table", the "line definition" must be added to the blocks.#

      1. Notes

It is used by the user to write notes into the block.#

      1. Cut-Copy-Paste-Delete

File:Resim 34.pngFile:Resim 40.png

Cut-copy-paste-delete operations can be performed on the blocks used in the Mikrodiagram project. Cut-copy-delete operations can be done by right clicking on the block. For the "Paste" option, right click on an empty area in the Mikrodiagram workspace and select the "paste" option.#

      1. Align Horizontal-Align Vertical

File:Resim 42.png

File:Resim 47.png

It is used to scale the selected block group horizontally or vertically in the mikrodiagram.


In Mikrodiagram, project-specific configurations can be made from the "projects" section in mode options.#


Connected to device on TCP when, is used for Ip ,port, version etc. settings making and viewing#

      1. Connection

File:Resim 67.png

It is used to establish a connection to the device over the TCP port and to restart the device with the "Restart device" button on the TCP port.

In the "Device IP" section, the IP address of the device to which the TCP connection is to be made is written in. If a connection from a local network, connection from an external network, or connection to a GSM device will be established, appropriate IPs must be defined.

Port: The listening port identification of the device should be done. The standard listening port 502 in Mikrodev products. It can be changed.

In order for the "Restart device" button to be active, the TCP connection must be established.

      1. Firmware Update

File:Resim 14.png

After the TCP connection is established, use the name of the device embedded software you want to update.#

      1. Advanced Parameters

File:Resim 20.png

After the TCP connection is established, it is used to configure the device's version, IP, port, clock etc. settings. "Read parameters" are used to read the parameters, and "apply parameters" buttons are used to set the parameters.

When "apply parameters" is selected while "Sync Device time with PC time" is selected, the computer clock is written to the device.

In order to be able to set parameters of the GSM section, the device must be GSM supported product.

After making the settings with "Apply parameters", the device needs to be restarted.


The devices used in the project are selected.#

      1. Update Main Device

File:Resim 29.png

The device to load the Mikrodiagram project is selected. The main unit to be used in the project is clicked, the "Update MainDevice" tab is clicked to select from the devices.

      1. Add Selected Device/Remove Selected Device

File:Resim 66.png

If the number of physical inputs / outputs used in the prepared project is more than the number found on the main unit, it is necessary to add expansion units to the project.

Click on the relevant module in the Extension Devices section, click on the "Add Selected Device" tab to add. When the extension unit to be added is desired to be removed, the relevant unit can be clicked and the "Remove Selected Device" or "delete" key can be pressed.

For example, MP201 PLCs have 16 digital inputs (DI). If more than 16 digital inputs are used in the prepared project, it is necessary to add digital input expansion unit (IO200_I32).

      1. Incompatible Device Error Code:17

File:Picture 75.png

If a mistake is observed in loading the prepared project into the device, the number of physical inputs and outputs used in the project is more than "main unit and selected units".

The MP201 PLC and 32 digital input expansion modules (IO200_I32) have been added to the project in the above line. A total of "digital input" door types have been added to the project. However, since the digital input expansion module (IO200_I32) "extract the selected unit" was made, the "incompatible device error code: 17" error occurred when loading the project into the device.

The digital input expansion (IO200_I32) unit must be added again in order to avoid the error.


While SMS and DTMF search features are used in GSM products , SMS content and phone number are used for identification.

There are 64 lines in the text table and 64 characters per line.

Turkish characters should not be used in the text table.

The definitions in the text table must be selected from "text blocks" for use in SMS and DTMF searches.#

      1. String Text

File:Picture 76.png

Definitions in the text table The Mikrodiagram project is loaded into the device when it is sent to the device.

The way in which phone numbers are written in text contents may differ according to GSM operators (some operators support numbering with country phone codes as (+905001234567), others without country phone codes. (05011234567)).

No spaces between words when writing text content.


File:Resim 80.png

Block number of blocks, register addresses and variable types added to the project prepared in the mikrodiagram are used for easier definition of line definitions, logging and online monitoring situations.

There is also the possibility to export the table to CSV.#

      1. Select/Export Selected Blocks to CSV

File:Resim 81.png

It is used to transfer the selected blocks to CSV.

With the "Invert" tab, the selection of blocks is reversed.

All blocks are selected with the "All" tab.

With the "None" tab, the selections in all blocks are removed.

      1. Block No

File:Resim 82.pngFile:Resim 83.png

It is used to monitor block numbers of door types and to transfer them to CSV.

      1. Reg Address

File:Resim 85.pngFile:Resim 84.png

It is used to monitor modbus communication addresses of door types and to transfer them to CSV.#

      1. Line Description

File:Resim 86.png

File:Resim 87.png

It is used to modify and follow line definitions defined in blocks.

The line definitions can be changed from the block object properties and the block properties table.#

      1. Variable Type

File:Resim 88.png

There are 4 types of variables in mikrodiagram: logic, word, float, long type. It is used to monitor and transfer variable types of blocks to CSV.#

      1. Logging Active& DevNET

File:Resim 89.pngFile:Resim 90.png

It can be selected from the block object properties and the "Add log record to memory and synchronize with DevNET" options can also be changed from the block properties table.#

      1. Online View Active

File:Resim 91.png

It is possible to select the blocks to be watched and changed in the program via USB or TCP port. With "Turn on / off online monitoring for all blocks", online monitoring can be activated for all the blocks in the program, as well as the blocks that need to be monitored from the "online monitoring active" section can be selected.


File:Resim 93.pngFile:Resim 92.png#

      1. Descritions

1- In DNP3, IEC101 and IEC104 protocols, variable addresses, types and data transmission methods are used.

2- It is used in Modbus Protocol when it is desired to define a different Modbus address than the standard modbus register addresses on the blocks.

3- It can be used to read data recorded in table blocks starting from a specified address determined by TCP communication.

4- In mikrodiagram, "block definition" must be made to blocks so that blocks can be defined in variable address table.#

      1. Alias

File:Resim 94.png

It is used naming for blocks transferred to the table.#

      1. Start Address

File:Resim 95.png

It is used for variable address definitions.

If MODBUS is selected as the protocol type, the selected start address must be selected differently from the block addresses used in Mikrodiagram. (Variable addresses in mikrodiagram, word: 4000, binary: 1000, analog: 6000, long: 8000).#

      1. Line Label

File:Resim 160.png

Block selection is made, defined in the variable address table.

In Mikrodiagram should be defined "line definition" to blocks to be transferred to the variable address tab.

      1. Point Count

File:Resim 161.png

The number of addresses to be identified from the starting address added to the variable address table is determined. If table blocks are added to the variable address table, the number of points to be read according to the size of the table is automatically defined. (If the starting address is 10000 and the dot number is 4, the defined addresses are 10000, 10001, 10002 and 10003.)#

      1. Protocol Type

File:Resim 162.png

Değişken adres tablosuna aktarılan blokların haberleşme protokol tipi seçimi yapılmaktadır.#

      1. Object Type

File:Resim 163.png

Her protokolde farklılık gösteren nesne (değişken) tiplerinin seçimi yapılmaktadır.#

      1. Ocject Class

File:Resim 164.png

Nesne sınıflandırmaları tanımlanmaktadır.#

      1. Send On Trigger

File:Resim 165.png

File:Resim 174.png

In DNP3, IEC 101, IEC104 protocols, the data added to the variable address table at specific time intervals are used to sending to client of the datas. For example, if a trigger is detected for 10 seconds on the side of the IEC slave block and the defined block in the variable address table is "send on trigger"; The block value is sent to the client at intervals of 10 seconds.#

      1. Send Method/Change Value

File:Resim 166.png

File:Resim 176.png

In DNP3, IEC101, IEC104 protocols, the block values defined in the variable address table are used sending to client the when the change exceeds the specified value according to the determined change method. For example, if the sending method is "change level" and the change value is 4, then the value client is sent if the difference between the first value and the value to be sent is greater than 4. (If the first value is 15 and the last value is less than 11 or greater than 19, is sent.

      1. Example 1

File:Resim 175.png

File:Resim 177.png

In the sample; RTD block value in which the ambient temperature value is read is defined in the variable address table by the IEC104 protocol. In the variable address table, the address of the address is 12000 and the client will be sent when the temperature value changes by more than 1 ° C (as the value changes). "Send on trigger" is selected in the variable address table, but it is not active because the "Ttk" input of IEC104 slave block is left empty.

      1. Example 2

File:Resim 178.pngFile:Resim 179.png

In the sample; The analog input block values are printed in an analog table at the top and read from the address 11000 defined in the variable address table with 5 modbus protocol from the address. If the size of the analog table block is 20 bytes and 1 analog value is 4 bytes, 5 analog values are recorded in the table. Since the tabloda has 5 analogue values, the analogue table is selected as the line tag, so that the data on the tabloda is automatically displayed in the "variable address table" "dot number". The "send on trigger", "sending method" and "exchange value" sections are not active due to the Modbus TCP slave protocol feature.


File:Resim 167.png

In the mikrodiagram,changing the project working background and block colors; is used block name, block number, and register addresses on blocks. The settings are project-specific. Different settings can be used in each project.#

      1. Background Color

File:Resim 168.png

The mikrodiagram workspace background colors can be changed and reset to their initial settings.

      1. Block Color

File:Resim 169.png

Mikrodiagram block colors can be changed, reset to initial settings.#

      1. Data View

File:Resim 170.png

It can make block name, block number and modbus register addresses selection of display status on the block.

    1. IEC61850 TABLE

File:Resim 171.png

The projects prepared in the Mikrodiagram are tested without loading in the device and used in monitoring the reactions.#


File:Resim 180.png

File:Resim 181.png#

      1. Descritions

To run the project prepared in the Mikrodiagram in simulation mode, click on "simulation" from "mode selection".

Start the simulation with the Start button.

Values are written from "inputs" section to digital and analogue inputs. Digital and analog outputs, "output" section can be monitored.

File:Resim 182.pngFile:Resim 183.png

Assigning values to variables process (word, long, analog, binary register, etc.) is done from the displayed window by right clicking on the corresponding block.

Block status and values are monitored over blocks in simulation mode.

Note: Simulation mode is not active in some blocks such as communication blocks, motion control blocks, GSM blocks.


File:Resim 184.png

The projects prepared in the mikrodiagram are used after uploading to the device, monitoring the responses using USB or TCP port connection and assigning new values to the blocks.#


File:Resim 186.png

File:Resim 189.png#

      1. Cyle Perods(ms)

It is used to determine the cycle time of online view.At the specified time intervals, online monitoring is performed on the blocks, the block values are read and written over the blocks.#

      1. Descritions

The processes to be followed in order to get the project prepared in Mikrodiagram to "online view" mode;

1 - The selection of the blocks to be monitored online should be made under the heading "Online view active" in the "block configuration" tab in the "project configuration" section.

File:Resim 190.png

File:Resim 191.png

Selection of blocks to be monitored online can be done by right clicking on the block after loading the mikrodiagram project on the device and "enable / disabe online view".

2 - USB or TCP port connection is established.

3 - Prepared mikrodiagram project is loaded on the device.

4 - Reconnect the USB or TCP port.# - In the mode selection, click on "online view" and the "cycle periods" is set.

File:Resim 192.pngFile:Resim 193.png

Click "Start" to start online monitoring.

The red-blue colors flash on the blocks for which online monitoring is active.


File:Resim 194.png

It is necessary to connect the device to send the project prepared in Mikrodiagram to the device and to monitor online.

Mikrodiagram can be connected to the device via USB or TCP port.

Mikrodiagram can not be connected to USB and TCP port at the same time.#


In order to install the USB connection, the mikrodigem installed on the PC must have completed the installation of the USB driver.

There is no need to install a USB driver on computers with Windows10 or higher operating system.

After the USB Driver installation is complete, a USB cable is connected between the computer and the device.

"USB A and USB B" (printer cable) should be preferred when selecting USB cable. The USB B side is connected to the device and the USB A side is connected to the computer.

The COM port from which the USB cable connecting from Device Manager is defined is determined.

File:Picture 121.png

Connetion interface is accessed by clicking the File:Resim 195.pngtab in the build mode options.

File:Resim 197.png

"Connect using SERIAL USB" is selected, COM port selection is made. "OK" button is started the connection process.

File:Resim 198.png

File:Resim 199.png

When the “A USB connection is established between the device and computer on serial port COM8” warning is received and the connection button reaches the "connected" File:Resim 200.pngposition, the connection via USB is completed.


In order to establish a TCP connection between the computer and the device;

At least one of the "Ethernet, Wi-Fi or GSM" ports must be found in the device to be connected to the TCP.#

      1. Establishing a TCP Connection with Ethernet

For the Ethernet connection to be established;

1 - The device must be an ethernet port.

2 - The ethernet cable (CAT5, CAT6) connection must be established between the device and the computer.

3 - If the device and the computer are on the same local network, the defined IPs must be selected accordingly.#

      1. Defining IP to Device

The "mikroterminals" program must be used to make device IP settings via USB connection. (See section "Using Mikroterminals".)

File:Resim 223.png

The mikroterminal program can be accessed from the mikrodimagram "Tools" menu.

File:Resim 202.png

File:Resim 203.png

After the device and computer IP settings are complete, the device must be "pinged" from the computer for the "ethernet cable connection test" between the device and the computer.

File:Picture 127.png

For the "pinging" operation, the computer is typed in the "command window", the device IP is shown in the picture and "ENTER" is clicked.

If the resulting output in the top image occurs, the ping operation is "unsuccessful". IP settings and ethernet cable connections should be checked again.

If the result output looks like the following figure, the ping operation is "successful".

File:Picture 128.png

An ethernet TCP connection can be established from the mikrodiagram to the device.#

      1. Defining Listening Port to Device

The standard listening port 502 in Mikrodev products is defined as.

To change the default listening port 502;

1- A TCP socket block should be added to the project prepared in Mikrodiagram.
File:Resim 204.png

2- Socket type "TCP server" is selected.

3- Listen port is defined.

4- Select "Ethernet", "GSM" or "Wi-Fi" as the "Media type".

Note: The listening port can be defined by the number of TCP socket blocks added as a server in the mikrodiagram project.

      1. Ethernet Connection Test

After making the necessary settings for Ethernet connection, for TCP connection;

1 - The link in the Build mode options is clicked on the File:Resim 205.pngtab.

File:Resim 206.png

2 - Click "Settings" in the window that opens.

File:Resim 207.png

3 - In the window that opens, "Device IP" section is device IP and device listen port is write in "Port" section.

4- Select "Connect using TCP" and click "OK" to install TCP connection.

File:Resim 208.png

File:Resim 209.png

5- When the TCP connection is established, a warning "A TCP connection is established between the device and computer" appears on the screen.

The link icon is displayed as "Connected" File:Resim 210.png.#

      1. Establishing a TCP Connection with GSM

In the Mikrodiagram,GSM with the for installing TCP connection to the device;

1 - The device must have GSM-enabled .

2 - GSM antenna of the device should be connected.

3 - The device signal quality (CSQ) must be between 1 and 31.

4 - SIM card with data package (internet package) should be inserted into the device. (The SIM card must have a fixed IP address.)

5 - APN identification of the inserted SIM card should be done to the device.

6 - The mikrodiagram installed computer must be connected to the "wide area network" (WAN) (internet network).#

      1. Defining IP to Device

In order to establish a TCP connection from the mikrodiagram to the GSM-enabled device,to the "device IP" section is written in IP of GSM.

File:Resim 211.png

Other operations outside the GSM IP definition are identical to the Ethernet TCP connection.


There are 2 methods to load the project prepared in the mikrodiagram into the device.

The project can be sent to the device via USB or TCP connection.#


USB connection between device and computer After File:Resim 213.pngis establishment, File:Resim 214.pngis clicked on "send to device" button.

If the output is as follows in the section "General Messages" in the mikrodiagram, then the mikrodiagram project is successfully loaded into the device.

Care must be taken to ensure that the file upload process is 100% complete.

With the USB connection, the device restarts automatically when the project uploading process to the device is 100% complete.

File:Resim 215.png#


TCP connection between device and computer After File:Resim 218.pngis establishment, File:Resim 217.pngis clicked on "send to device" button.

File:Picture 140.png

The project loading process must be waited to be 100% complete.

Unlike the case of loading the project with USB, device restart is performed manually.

File:Resim 219.png

After the project loading process is completed 100%, click "connection" from the "device configuration", click "restart device" and the project loading process is completed.


In Mikrodev products,"AT Commands" are used for device version, IP, clock etc. informations with USB port connection to read and make settings.

AT commands can be defined in the "Mikroterminal or Mikrodev Assistant" program.#


The mikroterminal program can be accessed from the Mikrodiagram Tools menu.

File:Resim 221.png

File:Resim 222.png#

      1. Opening the USB COM Port

File:Resim 96.png

To open the COM port on the mikroterminal, select the port where the connection between the device and the computer is established in the "port name" section. (The connection port between the device and the computer can be controlled from the "device manager".)

When the "Open" tab is clicked, the COM port information displayed in the "console window" is displayed.

      1. Device Selection

File:Resim 97.png

The list of AT commands for the device selected from the device selection tab is displayed in the window under "Device configuration wizard".

If "Manual configuration" is selected, AT commands can be sent to the device.#

      1. Sending The AT Command

With AT commands, the current settings on the device can be read or the desired values can be written to the device.

File:Resim 98.png

Click on the "Read" button to read the current settings on the device. When the "Read" button is clicked, the current value in the device is displayed in the "console window".

File:Resim 99.png

In case the current settings of the device are to be changed by AT commands, the value to be changed is written on the window, then the "Write" button is clicked. The value written is displayed in the "console window". If the write operation is successful, the command “OK" is printed in the console window.#

      1. Custom Command Window

File:Resim 100.png

AT commands can also be sent from the custom command input window.

If the current value in the device is to be read, the window "AT + SPECIALTY =?" is written, the "send" button is clicked, the current value is displayed in the console window.

File:Resim 101.png

If you want to write a value from the device specific command window, the command "AT + SPECIALTYPE = WRITE KOMUT" is defined and the value written when the "send" button is clicked is displayed in the console window.

If the write operation is successful, the command "SPECIALTY = OK" is printed in the console window.#

    1. List of The AT Command

Some of the AT commands used in Mikrodev products are only readable and some have both readable and writeble capabilities.

The commands on the AT command list differ according to the devices.

The AT commands used in GSM, Ethernet, Wi-Fi enabled products are indicated in the headers (E / G / W).#

      1. AT+FBD

In mikrodiagram, it is used to read block value and write block value by using "block numbers" of door types.

If the value is to be written, "AT + FBD = BLOKNO, VALUE" is defined and clicked on the "write" command.

If the block value is to be read, "AT + FBD = BLOKNO,?" is defined and clicked on the "write" command.

The "read" command is not used in the AT + FBD command, only the "write" command is used.


File:Resim 103.png

File:Resim 106.png

Since the 3000 no of block is a register block, both writing and reading can be done.

When "AT + FBD = 3000,10" is entered and "summer" button is clicked, "10" value is written on block. Value information written is displayed as "FBD = OK" in the console window.

File:Resim 105.png

If you want to read the block value of no 3000 , "AT + FBD = 3000,?" is written and when the "write" command is clicked, the block value is displayed as "FBD = 10" in the console window.#

      1. AT+LOCALIP(E/W)

Used to identify local IP to devices with Ethernet or Wi-Fi capability

File:Resim 107.png

To change the local IP, type "AT + LOCALIP = IP" and click "write" command to write IP to the device.

Click on the "read" command to read the current IP value.#

      1. AT+MAC(E/W)

It is used to define the MAC address for devices with Ethernet or Wi-Fi capability.

Numbers can be defined in hexadecimal.

File:Resim 108.png

The MAC address can be changed by typing "AT + MAC" command and clicking "write". The current MAC address can be read with "read" command.#

      1. AT+GATEWAY(E/W)

It is used to define gateway to devices with Ethernet or Wi-Fi capability.

In a local network, the gateway is usually the IP address of the modem.

File:Resim 109.png

AT + GATEWAY "command to read and write the gateway address.#

      1. AT+NETMASK(E/W)

It is used to define "netmask" for devices with Ethernet or Wi-Fi capability.

File:Resim 110.png

Netmask can be read and written with "AT + NETMASK" command.

      1. AT+ONLINE

It is used to start and stop the online viewing from the mikroterminal while online viewing is performed in the mikrodiagram.

Online monitoring is started when AT + ONLINE = 1 command is sent.

Online monitoring is stopped when AT + ONLINE = 0 command is sent.#

      1. AT+VERSION

Mikrodev products software and hardware version information can be accessed with AT + VERSION command.

File:Resim 111.png

The command "AT + VERSION" is only readable. The write operation can not be performed.

The "Quick user guide" contains detailed information on the version.#

      1. AT+SERIALNO

The Mikrodev products serial number information can be accessed with the command "AT + SERIALNO".

File:Resim 112.png

The command "AT + SERIALNO" is only readable. The write operation can not be performed.

The "Quick user guide" contains detailed information on the serial number.#


Connection status check of Mikrodev products with GSM data exchange feature is done by "AT + CONNECTION" command.

File:Resim 113.png

The AT + CONNECTION command has only readability.

The AT + CONNECTION command receives even-numbered values 0-8.

The AT + CONNECTION command response table is below.

AT Command Answer Explanation
AT+CONNECTION 4 The signal quality is normal, the device is trying to get IP.
AT+CONNECTION 6 The device has received an IP. The connection between the device IP and another IP is not established.
AT+CONNECTION 8 The device has received an IP. The device is connected to another point.
      1. AT+HELP

AT command list is reached. Information on the use of commands is also provided.

File:Resim 114.png

Writable AT commands, AT commands giving status information are provided.#

      1. AT+SETTIME

With the AT + SETTIME command, the device real time clock can be read and written.

File:Resim 115.png

When the AT + SETTIME command "read" is clicked, the current time of the device readable in the console window, the date and time to be set to the command window; When set to "dd-mm-yyyy h:m:s" and the "summer" command is sent, the time set is displayed in the console window.#

      1. AT+ERROR

If the device is in error mode, it is used to learn the error code.

File:Resim 116.png

If AT + ERROR = 0, then there is no error condition.

AT + ERROR = 61 means that the device does not have mikrodiagram installed

The AT + ERROR command is only a readable command.

Error Kodu Açıklama
0 There is no error condition.
61 Device does not have mikrodiagram installed
      1. AT+DEFAULT

The AT + DEFAULT command is used to reset the unit to factory settings.

File:Resim 117.png

When AT + DEFAULT = 1 command is written and "write" is clicked, the device is restored to factory settings.

When the device is restored to factory settings, the settings made with the AT commands are restored to factory settings, the most recently loaded mikrodiagram project is deleted from the device.

After the command is sent, the device drops to error ERROR = 61

The command AT + DEFAULT is only writable.#

      1. AT+RESET

The AT + RESET command is used for software restart of the device.

File:Resim 118.png

When AT + RESET = 1 is typed and the "send" button is clicked, the device is restarted.#

      1. AT+PLCRESET

The AT + PLCRESET command is used when TCP communication protocols require the device to be reset after a certain period of time.

File:Resim 119.png

If AT + PLCRESET = 0 command is sent to the device, the command is disabled.

The AT + PLCRESET command runs at a minimum 60 second (sec) scale.

To learn the current PLCRESET command programmed in the device, enter AT + PLCRESET =? command can be sent to the device.#


The AT + CONFIGPORT command is used to identify the port number used in situations where a TCP port connection from the Mikrodiagram is desired to be installed on devices with a TCP communication port (Ethernet, GSM, Wi-Fi).

File:Resim 120.png

The factory default ConfigPort number is 502.

It can be changed with AT + CONFIGPORT command.

AT + = CONFIGPORT? command can be learned with the current configport.

File:Resim 122.png

CONFIGPORT is disabled when a selected TCP socket block is added to the device as a server mikrodiagram. The device's listening port is the listening port that is inserted into the TCP socket block.#


File:Resim 123.png#

      1. AT+LWIPTMO
      2. AT+FORMATFS

AT + FORMATFS = 1 command is used to format Mikrodev products. When the AT + FORMATFS = 1 command is sent to the device, the firmware will be deleted, so it is necessary to load the firmware again to program the device.#


AT + CANTIMEOUT command Mikrodev is used to protect the position of the inputs and outputs on the expansion units for a specified period of time in case of communication failure between CPU modules and expansion units.

File:Resim 124.png

The CANTIMEOUT time runs in millisecond (ms) time scale.

When the communication link between the input modules and the CPU breaks, inputs up to the number of CANTIMEOUT entered into the CPU do not change position in the software.

When the communication link between the output modules and the CPU breaks, the outputs do not change positions as long as the CANTIMEOUT times entered in the output modules.

The CANTIMEOUT time input to the CPU is used for the input modules, the CANTIMEOUT time input to the output modules for the output modules is used.

For example, if AT + CANTIMEOUT = 60000 (ms) is defined for the CPU and expansion units, the incoming digital input signal position is maintained through the expansion unit until 60000 (ms) (1 minute) after communication between the digital input (DI) expansion unit and the CPU is interrupted. 60000 ms. After the CANTIMEOUT time has elapsed, the digital inputs are pulled to logic (0) if no connection to the expansion unit is still present.#

      1. AT+GPRSIP(G)

The data package (internet package) is the IP of the SIM card. Supplied by the GSM operator.

It can only be read by AT + GPRSIP command. Changed.

If the device is to be used as a server, a SIM card with a fixed IP address must be provided.

  When a SIM card with a fixed IP is provided, APN information must also be received from the GSM operator#

      1. AT+GPRSAPN(G)

AT + GPRSAPN command is used to define APN for Mikrodev products with GSM TCP communication feature.

Since the APN that needs to be defined varies according to the SIM card operator used in the device,it must be supplied from the customer service of the relevant GSM operator.

The APN has to be defined if the used device is to be used as a server in the TCP communication with the GSM line (if the device will connect to another IP).

Note: The SIM card used in the APN-defined device must have a static IP

      1. AT+CSQ(G)

It is the value of the GSM signal quality (the power of the GSM line) that the devices with GSM capability are installed. It can be between -1 and 31.

Even if the SIM card is not inserted, the value can be read while the GSM antenna is connected. (Emergency calls are used on mobile phones when the SIM card is not inserted.)

AT + CSQ is only readable command.

The pull chart is as follows.

Command Signal quality Explanation
AT+CSQ -1 No
AT+CSQ 1-X Weak
AT+CSQ X-Y Middle
AT+CSQ Z-31 Very good
      1. AT+SIM(G)

It is used for SIM card inquiry in Mikrodev products with GSM hardware.

With "AT + SIM =?" read only command. The value can not be written.

If the answer to the command is SIM = 1, it indicates that the SIM card is correctly installed and is fault-free.

The response to the command is SIM = 0 to indicate that the SIM card is not inserted, is incorrectly installed or is defective.#

      1. AT+GPRSNAME(G)
      2. AT+GPRSSSW(G)
      3. AT+WIFISSID(W)

It is used to identify the WI-FI network name to be included in WI-FI enabled products.

In the "AT + WIFISSID" command window, the WI-FI name is written, the "write" command is clicked,

When you want to read the current WI-FI SSID, click "AT + WIFISSID" "read" command.#

      1. AT+WIFIPSSW(W)

It is used to describe the password of the WI-FI network to be included in WI-FI-enabled products.

AT + WIFIPSSW WI-FI password is written into the command window, click on the "write" command,

When the current WI-FI password is desired to be read, the AT + WIFIPSSW "read" command is clicked.#

      2. AT+TEMPTYPE

For products with RTD temperature sensor input, temperature sensor selection is made.

Hardware must be manufactured in accordance with the temperature sensor of the product.

The PT100 temperature sensor can be used if AT + TEMPTYPE = 0.

The NTC temperature sensor can be used if AT + TEMPTYPE = 1.

The PT1000 temperature sensor can be used if AT + TEMPTYPE = 2.#


Hardware product code inquiry for the products in Mikrodev product family is made.

The code that starts with the letter "p" (p42, p46, etc.) in the product embedded software (MP201_E_s11.09p42) must match the AT + PRODUCTNO code.

  AT + PRODUCTNO is the only readable command.#

      1. AT+PTO

It is used to activate the "pulse train output" and "axis control" blocks.

AT + PTO = 1 command is activated. AT + PTO = 0 disable the command.

For current status inquiry, "AT + PTO =?" Command can be sent.#

      1. AT+SOCKET

It is used to monitor the active connections of TCP socket blocks in the mikrodiagram project.

When AT + SOCKET = <"TCP Socket Block" Block Number> command is sent to the device, the connections made from the relevant TCP socket block are displayed.

Those with status "1" indicate that the connection exists. The "status" states, which are different from "1", indicate that the link already existed, but that the link broke down before the specified time.

File:Resim 125.png#


It shows how many times the device is restarted after the mikrodiagram project is loaded. The first value is 1 since the device is restarted after the mikrordiagram project has been loaded.

Writable and readable command.

AT + = POWERCOUNT? , The current value is queried, and the desired value can be written with the command AT + POWERCOUNT = <Set value>