Difference between revisions of "softMI HMI Getting started"

From SoftMC-Wiki
Jump to: navigation, search
 
(13 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Languages|softMI_HMI_Getting_started}}
 
This is a tutorial for first configuration of SoftMC with SoftMI thru HMIStudio  <br />
 
  
----------------------------------------------------------------------------------------------------------------------------------------------
+
This is a tutorial for first configuration of SoftMC with SoftMI through&nbsp;HMIStudio.
 +
 
 +
&nbsp;
 +
 
 +
== Access HMI properties and IP configuration ==
 +
 
 +
Turn HMI power off. Long press anywhere on the screen. Turn HMI power on.
 +
 
 +
Now properties windows pops up at power on. Notice, changing IP address will only saved after downloading initial project to HMI.
 +
 
 
== Creating project and adding network components ==
 
== Creating project and adding network components ==
  
Open new project:<br />
+
Open new project:<br/> [[File:HMI18.png|RTENOTITLE]]
[[File:HMI18.png]]
 
  
 
At the left side bar - "Graph Element Window" select HMI tab, and choose HMI type.
 
At the left side bar - "Graph Element Window" select HMI tab, and choose HMI type.
  
 +
[[File:HMI2.png|RTENOTITLE]]
  
[[File:HMI2.png]]
+
At the left side bar - "Graph Element Window" select PLC tab, and choose controller / PLC type.<br/> Drag and drop in center window:
  
At the left side bar - "Graph Element Window" select PLC tab, and choose controller / PLC type.<br />
+
[[File:HMI3.png|RTENOTITLE]]
Drag and drop in center window:
 
  
[[File:HMI3.png]]
+
At the left side bar - "Graph Element Window" select Connector tab, and choose communication type.<br/> In this example I choose Ethernet (TCP)<br/> Drag and drop in center window:
  
At the left side bar - "Graph Element Window" select Connector tab, and choose communication type.<br />
+
[[File:HMI4.png|RTENOTITLE]]
In this example I choose Ethernet (TCP)<br />
 
Drag and drop in center window:
 
  
[[File:HMI4.png]]
+
At the pop up window - "Network Device Setting" press "Add".<br/> Set HMI IP, and choose correct Comm Protocol:
  
At the pop up window - "Network Device Setting" press "Add".<br />
+
[[File:HMI5.png|RTENOTITLE]]
Set HMI IP, and choose correct Comm Protocol:<br />
 
  
[[File:HMI5.png]]
+
Press "Add" again, and set SoftMC IP and comm protocol:
  
Press "Add" again, and set SoftMC IP and comm protocol:<br />
+
[[File:HMI6new.png|RTENOTITLE]]
  
[[File:HMI6.png]]
+
After adding both HMI and PLC this is the final display:
  
After adding both HMI and PLC this is the final display:<br />
+
[[File:HMI7new.png|RTENOTITLE]]
  
[[File:HMI7.png]]
+
Double click the HMI for access extra Attribute configure:
  
Double click the HMI for access extra Attribute configure:<br />
+
[[File:HMI8.png|RTENOTITLE]]
  
[[File:HMI8.png]]
+
&nbsp;
 +
 
 +
&nbsp;
  
 
== Importing Parameters file (CSV) ==
 
== Importing Parameters file (CSV) ==
  
SoftMC Modbus Configurator is generating CSV file containing the project parameters and their Modbus addresses.<br />
+
SoftMC Modbus Configurator is generating CSV file containing the project parameters and their Modbus addresses.
  
Generating CSV file with Modbus Configurator [[http://softmc.servotronix.com/wiki/Modbus_Communication_API#Modbus_Configurator]]
+
Generating CSV file with Modbus Configurator [[http://softmc.servotronix.com/wiki/Modbus_Communication_API#Modbus_Configurator [1]]]
  
Importing the CSV file to HMIStudio:<br />
+
Importing the CSV file to HMIStudio:<br/> Go to “Project Database” tab in “Graph Element Window”, and choose “Address Tag”:
Go to “Project Database” tab in “Graph Element Window”, and choose “Address Tag”:<br />
 
  
[[File:HMI9.png]]
+
[[File:HMI9.png|RTENOTITLE]]
  
Import the CSV File:<br />
+
Import the CSV File:
  
[[File:HMI10.png]]
+
[[File:HMI10.png|RTENOTITLE]]
 +
 
 +
Once the .CSV file was selected, the parameters (Modbus Tags) should appear in the Address Tag list.
 +
 
 +
[[File:Picture1.png|RTENOTITLE]]
 +
 
 +
&nbsp;'''Note''': If the Modbus Tags do not appear on the list, make sure the "AddrPLCID" in the .CSV&nbsp;file is similar to the defined PLC Controller. If not, change the address in the .CSV, save it and import the file again
 +
 
 +
[[File:csvadr.JPG|1000x500px|csvadr.JPG]]
 +
 
 +
&nbsp;
  
[[File:HMI11.png]]
 
  
  
 
== Build and design the interface ==
 
== Build and design the interface ==
Operations in HMI screen are carried out thru Components.<br />
 
In this components user can execute SoftMC Functionality, read and write data.<br />
 
  
To enter screen design window, Right click on HMI, and “Edit”:<br />
+
Operations in HMI screen are carried out through Components.<br/> In this components user can execute SoftMC Functionality, read and write data.
  
[[File:HMI12.png]]
+
To enter screen design window, Right click on HMI, and “'''Edit'''”:
  
Basic components are located at "Graph Element Window" at "PLC Parts":<br />
+
[[File:HMI12.png|RTENOTITLE]]
  
[[File:HMI13.png]]
+
Basic components are located at "Graph Element Window" at "'''PLC Parts'''":
  
Drag and drop required component to center window (HMI Screen).<br />
+
Lets create an ON / OFF button, which will use the Modbus tag “ENAB” and “DISAB”.
When doing so, arttribute of the component will open:<br />
 
  
[[File:HMI14.png]]
+
[[File:HMI13.png|RTENOTITLE]]
  
Check the box “Use Address Tag”. Then Parameters from CSV file will shown in “Addr. Type” – only if their type fit (for example this is “Bit” switch, so only “EN_BIT1” is shown because it is the only bit in CSV file.<br />
+
Drag and drop required component to center window (HMI Screen).<br/> When doing so, arttribute of the component will open:
After finish configuration and pressing OK, another left click on screen to place the switch.<br />
+
 
 +
1.Select “'''Bit State Switch'''”.
 +
 
 +
2.Select “'''Use Address Tag''':”.
 +
 
 +
3.In Addr. Type, select the desired parameter.
 +
 
 +
4.Select “'''Bit State Switch'''”.
 +
 
 +
5.In Switch Type, select “'''Reset'''”. This will reset the button and return it to “0” value.
 +
 
 +
[[File:onoffbutton.JPG|1000x500px|onoffbutton.JPG]]
 +
 
 +
<span style="font-size:larger;">'''Repeat the procedure for “DISAB” Modbus tag.'''</span>
 +
 
 +
&nbsp;
 +
 
 +
Now lets add a bit lamp, which will indicate whether the drive is ON or OFF.
 +
 
 +
1.Select “Bit State Switch”. Remember ENAB Register Type is a “Bit”
 +
 
 +
2.Select “Use Address Tag:”.
 +
 
 +
3.In Addr. Type, select the desired parameter.
 +
 
 +
[[File:bitlamp.JPG|1000x500px|bitlamp.JPG]]
 +
 
 +
The final screen should look lie this:
 +
 
 +
[[File:Picture3.png|700x400px|Picture3.png]]&nbsp;[[File:Picture2.png|700x400px|Picture2.png]]
  
 
== Component Attribute ==
 
== Component Attribute ==
It is important to fully configure the component, in means of data tpye, size, operation, etc. <br />
 
For example, when adding number display, make sure “Data width” is according to what configured in softMC Modbus configurator:<br />
 
  
[[File:HMI15.png]]
+
It is important to fully configure the component, in means of data tpye, size, operation, etc.<br/> For example, when adding number display, which is a 16bit register (Hreg), make sure “Data width” is according to what configured in softMC Modbus configurator:
 +
 
 +
[[File:HMI15.png|RTENOTITLE]]
 +
 
 +
*“Word” is 16bit
 +
 
 +
In SoftMC:
 +
 
 +
*“Short” = 16bit
 +
*“Long” = 32bit
  
“Word” is 16bit<br />
 
In SoftMC:<br />
 
“Short” = 16bit<br />
 
“long” = 32bit<br />
 
 
So if chosen parameter as “long”, choose DWORD (double word).
 
So if chosen parameter as “long”, choose DWORD (double word).
 +
 +
  
 
== Download project to HMI ==
 
== Download project to HMI ==
First project download (brand new HMI from the box) must be performed thru serial communication.
 
Wiring:
 
  
[[File:HMI16.png]]
+
First project download ('''brand new HMI from the box''') must be performed through serial communication. Wiring:
 +
 
 +
[[File:HMI16.png|RTENOTITLE]]
 +
 
 +
'''Note''': If the computer does not support RS232 input, an RS232 to USB '''adapter '''can be used.
 +
 
 +
[[File:wiring.jpeg|700x500px|wiring.jpeg]]
 +
 
 +
Once connected with serial connection, in the tool bar, select “Tools” > “Compile All(R)”.
 +
 
 +
Then “Tools” > “Download Way(A)”> Download Device select: “Com”.
 +
 
 +
[[File:HMI17.png|RTENOTITLE]]
 +
 
 +
[[File:commportjpg.jpg|RTENOTITLE]]
 +
 
 +
'''Note''': There are 9 COM numbers available in “PC Serial No.”. However, the device may have received a different COM number, which is higher then 9. That is OK, select any COM from COM1-COM9.
 +
 
 +
If the device received a COM number, which is higher then 9, it should be modified to match the selected COM number chosen in the previous slide (See Below). If the device received a COM number, which is lower then 9, change the COM in the “PC Serial No.” to match the device COM.
 +
 
 +
•Right click on the Computer > Manage > Device Manager.
 +
 
 +
•Locate you device and check COM number. If it is Higher then 9, go through steps 1-5.
 +
 
 +
'''Note''': COM1-9 may be already in use. Select the desired COM number and continue anyway.
 +
 
 +
[[File:commportjpg2.jpg|1200x450px|commportjpg2.jpg]]
 +
 
 +
Now go back to HMIStudio, select the correct COM number and click OK.
  
[[File:HMI17.png]]
+
[[File:commportjpg.jpg|RTENOTITLE]]
  
== Access HMI properties and IP configuration ==
+
To&nbsp;download the project to the HMI, go to “'''Tools'''” > “'''Download(D)'''"&nbsp;and click Download.
Turn HMI power off.
+
 
Long press anywhere on the screen.
+
[[File:Picture4.png|RTENOTITLE]]
Turn HMI power on.
 
  
Now properties windows pops up at power on.
+
[[Category:Modbus Communication]]
Notice, changing IP address will only saved after downloading initial project to HMI.
 

Latest revision as of 11:57, 10 February 2020

This is a tutorial for first configuration of SoftMC with SoftMI through HMIStudio.

 

Access HMI properties and IP configuration

Turn HMI power off. Long press anywhere on the screen. Turn HMI power on.

Now properties windows pops up at power on. Notice, changing IP address will only saved after downloading initial project to HMI.

Creating project and adding network components

Open new project:
RTENOTITLE

At the left side bar - "Graph Element Window" select HMI tab, and choose HMI type.

RTENOTITLE

At the left side bar - "Graph Element Window" select PLC tab, and choose controller / PLC type.
Drag and drop in center window:

RTENOTITLE

At the left side bar - "Graph Element Window" select Connector tab, and choose communication type.
In this example I choose Ethernet (TCP)
Drag and drop in center window:

RTENOTITLE

At the pop up window - "Network Device Setting" press "Add".
Set HMI IP, and choose correct Comm Protocol:

RTENOTITLE

Press "Add" again, and set SoftMC IP and comm protocol:

RTENOTITLE

After adding both HMI and PLC this is the final display:

RTENOTITLE

Double click the HMI for access extra Attribute configure:

RTENOTITLE

 

 

Importing Parameters file (CSV)

SoftMC Modbus Configurator is generating CSV file containing the project parameters and their Modbus addresses.

Generating CSV file with Modbus Configurator [[1]]

Importing the CSV file to HMIStudio:
Go to “Project Database” tab in “Graph Element Window”, and choose “Address Tag”:

RTENOTITLE

Import the CSV File:

RTENOTITLE

Once the .CSV file was selected, the parameters (Modbus Tags) should appear in the Address Tag list.

RTENOTITLE

 Note: If the Modbus Tags do not appear on the list, make sure the "AddrPLCID" in the .CSV file is similar to the defined PLC Controller. If not, change the address in the .CSV, save it and import the file again

csvadr.JPG

 


Build and design the interface

Operations in HMI screen are carried out through Components.
In this components user can execute SoftMC Functionality, read and write data.

To enter screen design window, Right click on HMI, and “Edit”:

RTENOTITLE

Basic components are located at "Graph Element Window" at "PLC Parts":

Lets create an ON / OFF button, which will use the Modbus tag “ENAB” and “DISAB”.

RTENOTITLE

Drag and drop required component to center window (HMI Screen).
When doing so, arttribute of the component will open:

1.Select “Bit State Switch”.

2.Select “Use Address Tag:”.

3.In Addr. Type, select the desired parameter.

4.Select “Bit State Switch”.

5.In Switch Type, select “Reset”. This will reset the button and return it to “0” value.

onoffbutton.JPG

Repeat the procedure for “DISAB” Modbus tag.

 

Now lets add a bit lamp, which will indicate whether the drive is ON or OFF.

1.Select “Bit State Switch”. Remember ENAB Register Type is a “Bit”

2.Select “Use Address Tag:”.

3.In Addr. Type, select the desired parameter.

bitlamp.JPG

The final screen should look lie this:

Picture3.png Picture2.png

Component Attribute

It is important to fully configure the component, in means of data tpye, size, operation, etc.
For example, when adding number display, which is a 16bit register (Hreg), make sure “Data width” is according to what configured in softMC Modbus configurator:

RTENOTITLE

  • “Word” is 16bit

In SoftMC:

  • “Short” = 16bit
  • “Long” = 32bit

So if chosen parameter as “long”, choose DWORD (double word).


Download project to HMI

First project download (brand new HMI from the box) must be performed through serial communication. Wiring:

RTENOTITLE

Note: If the computer does not support RS232 input, an RS232 to USB adapter can be used.

wiring.jpeg

Once connected with serial connection, in the tool bar, select “Tools” > “Compile All(R)”.

Then “Tools” > “Download Way(A)”> Download Device select: “Com”.

RTENOTITLE

RTENOTITLE

Note: There are 9 COM numbers available in “PC Serial No.”. However, the device may have received a different COM number, which is higher then 9. That is OK, select any COM from COM1-COM9.

If the device received a COM number, which is higher then 9, it should be modified to match the selected COM number chosen in the previous slide (See Below). If the device received a COM number, which is lower then 9, change the COM in the “PC Serial No.” to match the device COM.

•Right click on the Computer > Manage > Device Manager.

•Locate you device and check COM number. If it is Higher then 9, go through steps 1-5.

Note: COM1-9 may be already in use. Select the desired COM number and continue anyway.

commportjpg2.jpg

Now go back to HMIStudio, select the correct COM number and click OK.

RTENOTITLE

To download the project to the HMI, go to “Tools” > “Download(D)" and click Download.

RTENOTITLE