Mikrodiagram User Guide
INTRODUCTION[edit | edit source]
ABOUT MIKRODIAGRAM[edit | edit source]
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).
SETUP[edit | edit source]
SYSTEM REQUIREMENTS[edit | edit source]
Minimum computer requirments for Mikrodiagram setup:
Operating system: Microsoft Windows XP/Vista/7/8/10/12 (32/64 Bit), Linux
CPU: 500 Mhz
RAM: 512 MB
Video Card: 128 MB
Disk Area: 200 MB
MIKRODIAGRAM SETUP[edit | edit source]
Mikrodiagram software is designed to work with current Windows versions. The installation file can be downloaded free of charge from the following internet address:
https://www.mikrodev.com/downloads/Mikrodiagram/MikrodiagramSetupSTM_latest.zip
Mikrodiagram setup is completed by following the directions on the screen.
USB DRIVER SETUP[edit | edit source]
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 Mikrodiagram is installed on a computer with Windows 10 or higher operating system.
INTERFACE[edit | edit source]
MENU OPTIONS[edit | edit source]
In Mikrodiagram menu options "File, Edit, Build, Tools, Window and Help" menus are available.
- File Menu
Basic program filing operations can be done from Mikrodiagram file menu.
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. |
It is used to print the prepared ".mdv" file with PDF, PS or physical printer. | |
Exit | Used to close Mikrodiagram. |
- Edit Menu
Edit menu is used for undoing the operation, restoring the undo operation, renaming, cutting, copying, pasting, and selecting all operations.
- Build Menu
The Build menu is used for compiling the project.
- Tools Menu
From the Tools menu, you can access Mikrodiagram interface configuration settings and the "Mikroterminal" program where the USB serial port device settings are made.
- Window Menu
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
- Help Menu
From the help menu you can access Mikrodiagram "help text" and "about Mikrodiagram" options.
Information on Mikrodiagram software version can be found on the "About Mikrodiagram" tab.
STATUS BAR[edit | edit source]
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.
- Object Move Mode
It is the mode selection used to move objects in Mikrodiagram work area.
- Object Connect Mode
It is the mode used to connect objects together in Mikrodiagram work area.
- Object Add Mode
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.
- Text Add Mode
It is the mode used to insert word note in Mikrodiagram study area.
- Add Line Label
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.
- Group Blocks
The projects prepared in Mikrodiagram work area are used in groups. Provides ease of reading and following the projects.
- Save- Save as
On Mikrodiagram, "Save" to save changes made to projects and "Save As" to save projects in a different folder.
- Diagram Setting
On Mikrodiagram, it is the mode selection used to adjust the dimensions of the work area to which door types can be added.
- Zoom In-Zoom Out-Reset Zoom
On 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.
- Find
On 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.
- Used Memory
On Mikrodiagram, the memory area to be used is observed when the prepared projects are uploaded to the device.
MODE OPTIONS[edit | edit source]
- Gate Editor
On Mikrodiagram, it is mode of project preparation.
- Projects
"Device configuration, PLC and extensions, text table, block properties table, variable address table, display options and IEC61850 table" options.
- Simulation
On Mikrodiagram, provide you to test the prepared projects in offline mode without loading the device and examine the program responses.
- Online View
It is used to track block values and load new values into blocks by USB or TCP connection to Mikrodiagram project loaded on the device
BUILD MODE OPTIONS[edit | edit source]
Build mode options can be switched to "connect / disconnect device, compile project, send to binary device, send project to device and project selection" modes.
- Device Connetion/ Disconnetion
Used to establish a connection between the device to be programmed and the computer. USB or TCP port connectivity options are available.
- Build Project
On Mikrodiagram, it is used to compile the prepared project.
- Send Binary to Device
Used to send binary files to the device.
- Send to Device
Used to send the prepared project to the device.
- Project Selection
On Mikrodiagram, if more than one project is open it is used to select the project to be sent to the device.
SIDEBAR OPTIONS[edit | edit source]
You can switch to the "block types, line labels, block packages, projects, open diagrams and file system" modes from sidebar options.
- Gate Types
On 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".
- Line Labels
While "line labels" is selected in the sidebar, "line definitions" defined in Mikrodiagram can be displayed and used in the project.
- Projects
While "line labels" is selected in the sidebar, open projects are displayed, and projects are selected.
- Split
It can be divided into sections using the "split" option to select more than one mode in the sidebar.
MIKRODIAGRAM CONFIGURATION[edit | edit source]
Mikrodiagram configuration can be accessed by clicking on "Options" on the "Tools" menu. "environment, text editor, diagram editor and version control" are available.
ENVIRONMENT[edit | edit source]
On the environment tab, there are "general, keyboard, external tools, MIME types and locator" options.
- General
From the General tab, Mikrodiagram interface color can be changed and the color settings can be reset. (Return to factory settings.)
Mikrodiagram have Turkish and English languages options.
If the files are changed from the outside in Mikrodiagram, the application status of the changes is checked.
Mikrodiagram needs to be restarted when selecting between language options.
When it is desired to automatically save changes made to the project in Mikrodiagram, the "modified files can be saved automatically" can be selected and the time interval to be saved can be specified.
- Keyboard
It provides access to the factory settings of the shortcut keys used in Mikrodiagram on the keyboard tab.
The shortcut key settings can be changed and the factory default settings can be restored.
- External Tools
- MIME Types
- Locator
TEXT EDITOR[edit | edit source]
The current status of the fonts used in Mikrodiagram is displayed.
With the font&colors, behavior, display, generic highlighter, snippets, completion options, the appearance of the text editor can be edited.
DIAGRAM EDITOR[edit | edit source]
It is used to make settings for Mikrodiagram background color, block color, page size and USB port selection
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.
It is used to make COM port selection from Mikrodiagram to serial port connection to device.
The "logging" to save newly created projects is selected.
VERSION CONTROL[edit | edit source]
- General
- Subversion
CREATING A PROJECT[edit | edit source]
The following steps are followed to create a new project in Mikrodiagram.
CREATING A NEW PROJECT[edit | edit source]
To create a new project in Mikrodiagram, select "New file or Project open " in the "File Menu".
- Step 1
- Step 2
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.
- Step 3
Programming method selection is done.
- Step 4
The device to be programmed and the expansion unit if required are selected.
- Step 5
Project configuration settings can be changed.
- Step 6
A new project has been created.
Project design can be started on the page opened by clicking on the file "main.mdv".
USING EDITOR[edit | edit source]
BLOCK INSERTING (GATE TYPE INSERTING)[edit | edit source]
Mikrodiagram-specific FBD (function block diagram) can be programmed with door types keep in the programming library
"Gate Types" are selected from the sidebar and the door type to be added is selected.
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.
INSERTING LINE LABEL[edit | edit source]
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.
- Step 1
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.
- Step 2
The "line tag" is added when clicking on the "add line tag" icon in 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.
- Step 3
Double-click on the line label to select from line definitions.
- Step 4
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.
INSERTING TEXT[edit | edit source]
It is used to add notes to project creation area in Mikrodiagram. The fonts and background of the added notes can be changed.
If you click on the "insert text" button in 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.
GRINDING OF BLOCKS[edit | edit source]
Mikrodiagram block grouping feature; it facilitates the follow-up of the functions of the block groups in the projects.
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
DIAGRAM SETTINGS[edit | edit source]
In Mikrodiagram, it is used to adjust the dimensions of the pages on which the projects are created.
In the diagram settings, page sizes can be selected from standard A3, A4, A5, A6, as well as making custom settings for the programmer.
GATE EDITOR[edit | edit source]
In the "gate editor" section of the mode options, the project creation page is accessed
OBJECT (BLOCK) PROPERTIES[edit | edit source]
Block properties are reached by right clicking on the blocks added in Mikrodiagram. Block features include "object properties, cut, copy, delete, align horizontal, align vertical " properties.
- Object Properties
In the block object properties, there are "parameters, line definition and notes" windows.
- 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. |
- 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 Mikrodiagram will be defined in the "variable address table", the "line definition" must be added to the blocks.
- Notes
It is used by the user to write notes into the block.
- Cut-Copy-Paste-Delete
image145.png
Cut-copy-paste-delete operations can be performed on the blocks used in 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 Mikrodiagram workspace and select the "paste" option.
- Align Horizontal-Align Vertical
It is used to scale the selected block group horizontally or vertically in Mikrodiagram.
PROJECT CONFIGURATION[edit | edit source]
In Mikrodiagram, project-specific configurations can be made from the "projects" section in mode options.
DEVICE CONFIGURATION[edit | edit source]
Connected to device on TCP when, is used for Ip ,port, version etc. settings making and viewing
- Connection
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.
- Firmware Update
After the TCP connection is established, use the name of the device embedded software you want to update.
- Advanced Parameters
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.
PLC AND EXPANSIONS[edit | edit source]
The devices used in the project are selected.
- Update Main Device
The device to load 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.
- Add Selected Device/Remove Selected Device
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).
- Incompatible Device Error Code:17
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.
STRING TABLE[edit | edit source]
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.
- String Text
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.
BLOCK PROPERTY TABLE[edit | edit source]
Block number of blocks, register addresses and variable types added to the project prepared in 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.
- Select/Export Selected Blocks to CSV
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.
- Block No
It is used to monitor block numbers of door types and to transfer them to CSV.
- Reg Address
It is used to monitor modbus communication addresses of door types and to transfer them to CSV.
- Line Description
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.
- Variable Type
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.
- Logging Active& DevNET
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.
- Online View Active
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.
VARIABLE ADDRESS TABLE[edit | edit source]
- Descriptions
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.
- Alias
It is used naming for blocks transferred to the table.
- Start Address
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).
- Line Label
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.
- Point Count
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.)
- Protocol Type
Communication protocol type selection of blocks transferred to variable address table is configured.
- Object Type
Object (variable) types that differ in each protocol are selected.
- Object Class
Object classification definitions
- Send On Trigger
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.
- Send Method/Change Value
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.
- Example 1
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.
- Example 2
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.
DISPLAY OPTIONS[edit | edit source]
In 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.
- Background Color
The Mikrodiagram workspace background colors can be changed and reset to their initial settings.
- Block Color
Mikrodiagram block colors can be changed, reset to initial settings.
- Data View
It can make block name, block number and modbus register addresses selection of display status on the block.
IEC61850 TABLE[edit | edit source]
SIMULATION[edit | edit source]
The projects prepared in Mikrodiagram are tested without loading in the device and used in monitoring the reactions.
SIMULATION[edit | edit source]
- Descriptions
To run the project prepared in 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.
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.
ONLINE VIEW[edit | edit source]
The projects prepared in Mikrodiagram are used after uploading to the device, monitoring the responses using USB or TCP port connection and assigning new values to the blocks.
ONLINE VIEW[edit | edit source]
- 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.
- Descriptions
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.
Selection of blocks to be monitored online can be done by right clicking on the block after loading 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.
5 - In the mode selection, click on "online view" and the "cycle periods" is set.
Click "Start" to start online monitoring.
The red-blue colors flash on the blocks for which online monitoring is active.
CONNECTING TO DEVİCE[edit | edit source]
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.
USB CONNECTION[edit | edit source]
In order to use the USB connection, installation of the USB driver should be completed.
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.
Connetion interface is accessed by clicking the tab in the build mode options.
"Connect using SERIAL USB" is selected, COM port selection is made. "OK" button is started the connection process.
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" position, the connection via USB is completed.
TCP CONNECTION[edit | edit source]
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.
- 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.
- Defining IP to Device
The "Mikroterminal" program must be used to make device IP settings via USB connection. (See section "Using Mikroterminals".)
Mikroterminal application can be accessed from Mikrodiagram "Tools" menu.
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.
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".
An ethernet TCP connection can be established from Mikrodiagram to the device.
- 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.
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 Mikrodiagram project.
- 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 tab.
2 - Click "Settings" in the window that opens.
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.
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" .
- Establishing a TCP Connection with GSM
In 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).
- Defining IP to Device
In order to establish a TCP connection from Mikrodiagram to the GSM-enabled device,to the "device IP" section is written in IP of GSM.
Other operations outside the GSM IP definition are identical to the Ethernet TCP connection.
LOADING THE MIKRODIAGRAM PROJECT TO DEVİCE[edit | edit source]
There are 2 methods to load the project prepared in Mikrodiagram into the device.
The project can be sent to the device via USB or TCP connection.
LOADING PROJECT WITH USB CONNECTION[edit | edit source]
USB connection between device and computer After connection is establishment, click on the "send to device" button.
If the output is as follows in the section "General Messages" in Mikrodiagram, then 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.
LOADING PROJECT WITH TCP CONNECTION[edit | edit source]
TCP connection between device and computer After the connection is establised, clicked on the "send to device" button.
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.
After the project loading process is completed 100%, click "connection" from the "device configuration", click "restart device" and the project loading process is completed.
13 THE AT COMMANDS[edit | edit source]
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.
MIKROTERMINAL INTERFACE[edit | edit source]
The mikroterminal program can be accessed from Mikrodiagram Tools menu.
- Opening the USB COM Port
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.
- 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.
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".
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.
- Custom Command Window
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.
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.
List of The AT Command[edit | edit source]
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).
- 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.
Example;
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.
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.
- AT+LOCALIP(E/W)
Used to identify local IP to devices with Ethernet or Wi-Fi capability
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.
- 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.
The MAC address can be changed by typing "AT + MAC" command and clicking "write". The current MAC address can be read with "read" command.
- 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.
AT + GATEWAY "command to read and write the gateway address.
- AT+NETMASK(E/W)
It is used to define "netmask" for devices with Ethernet or Wi-Fi capability.
Netmask can be read and written with "AT + NETMASK" command.
- AT+ONLINE
It is used to start and stop the online viewing from the mikroterminal while online viewing is performed in Mikrodiagram.
Online monitoring is started when AT + ONLINE = 1 command is sent.
Online monitoring is stopped when AT + ONLINE = 0 command is sent.
- AT+VERSION
Mikrodev products software and hardware version information can be accessed with AT + VERSION command.
The command "AT + VERSION" is only readable. The write operation can not be performed.
The "Quick user guide" contains detailed information on the version.
- AT+SERIALNO
The Mikrodev products serial number information can be accessed with the command "AT + SERIALNO".
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.
- AT+CONNECTION(G)
Connection status check of Mikrodev products with GSM data exchange feature is done by "AT + CONNECTION" command.
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 | 0 | |
AT+CONNECTION | 2 | |
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. |
- AT+HELP
AT command list is reached. Information on the use of commands is also provided.
Writable AT commands, AT commands giving status information are provided.
- AT+SETTIME
With the AT + SETTIME command, the device real time clock can be read and written.
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.
- AT+ERROR
If the device is in error mode, it is used to learn the error code.
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 |
- AT+DEFAULT
The AT + DEFAULT command is used to reset the unit to factory settings.
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.
- AT+RESET
The AT + RESET command is used for software restart of the device.
When AT + RESET = 1 is typed and the "send" button is clicked, the device is restarted.
- AT+PLCRESET
The AT + PLCRESET command is used when TCP communication protocols require the device to be reset after a certain period of time.
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.
- AT+CONFIGPORT
The AT + CONFIGPORT command is used to identify the port number used in situations where a TCP port connection from Mikrodiagram is desired to be installed on devices with a TCP communication port (Ethernet, GSM, Wi-Fi).
The factory default ConfigPort number is 502.
It can be changed with AT + CONFIGPORT command.
AT + = CONFIGPORT? command can be viewed with the current configport.
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.
- AT+SERVERTIMEOUT
- AT+LWIPTMO
- 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
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.
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.
- 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
- 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
- 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 | 0 | No |
AT+CSQ | 1-X | Weak |
AT+CSQ | X-Y | Middle |
AT+CSQ | Y-Z | Good |
AT+CSQ | Z-31 | Very good |
- 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.
- AT+GPRSNAME(G)
- AT+GPRSSSW(G)
- 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.
- 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.
- AT+POWERRESET
- 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.
- AT+PRODUCTNO
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.
- 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.
- AT+SOCKET
It is used to monitor the active connections of TCP socket blocks in 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.
- AT+POWERCOUNT
It shows how many times the device is restarted after 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>