Profinet

Many automation project requires Profinet communication. You can use Profinet ActiveX as a communication interface with it’s flexible structure in your projects.   License owners can use this ActiveX without any limitation. For who will purchase License a change can be made at free or paid ActiveX code. .NET Framework 3.5 is used at Profinet ActiveX.

ActiveX made by considering easily adding to the program and the easily meeting other probable needs. For this purpose some features that are not contained other ActiveXs like save project, fetch record added to ActiveX. Thus you can finish all operations about Profinet communication in a couple minutes.

 

 

Full Licence 1000 Usd.

Download link will be only displayed to registered users.
Login Register today!

 

 

 

Component Properties and their usage:

Public AutoStart_ As Boolean:

When this property True, component will continuously try to connect if PLC is off or there is another communication problem. Connection will be established when  PLC ready. False disables this property .

Following line makes Auto Start property True:

Profinet1.AutoStart_ = True

Following line assigns Auto Start property value to “i” variable:

i = Profinet1.AutoStart_

 

Property Value_(ByVal TagId As UInt32) As String:

Sets or gets the value. TagId is the row number in the Tag list.

Example: Following line assigns the 100 to Tag which locates at row 1:

Profinet1.Value_(1) = 100

Following line assigns the value of Tag which locates in the row 1 to variable i.

i = Profinet1.Value_(1)

 

Public FileName_ As String:

Returns the file name which contains active settings.

Example: Following line displays the active settings file name.

MsgBox(Profinet1.FileName_)

 

Property LoadSettings_() As String:

Loads previously saved setting file to the component. Return value of this property is file path.

Example: Following line loads the settings from the file which indicated by “path” variable.

Profinet1.LoadSettings_ = path

 

Public Sub SaveSettings_(ByVal value As String):

Saves the current connection settings to given path which contains filename.

Example: Following line saves the settings to the file which given in “path” variable.

Profinet1.SaveSettings_(path)

 

Property Connect_() As Boolean:

Sets or gets the connection status of component. Component connects to the PLC when this property becomes True. False, disconnects the component. This property returns True while component trying to connect. Real connection state is given by Connection property.

Example: Connection can be activated by following line:

Profinet1.Connect_ = True

Disconnects with following line:

Profinet1.Connect_ = False

 

Public Connection_ As Boolean:

Connection state can be get from this property. Returns True after the connection established.

Following line assings Connection State to “str” variable.

str= Profinet1.Connection_

 

Property PlcName_() As String:

Gets or sets the name of the PLC which will be connected.

Following line assings component’s PlcName property value to “str” variable.

str = Profinet1.PlcName_

Following line sets component’s PlcName property.

Profinet1.PlcName_ = str

 

Property PlcIpAddress__()As String:

Gets or sets the address of the PLC which will be connected.

Following line assings component’s PlcIpAddress property value to “str” variable.

str = Profinet1.PlcIpAddress__

Following line sets component’s PlcIpAddress property.

Profinet1.PlcIpAddress__ = str

 

Property PlcPortAddress__()  As UInt16:

Gets or sets the port of the PLC which will be connected.

Following line assings component’s PlcPortAddress property value to “i” variable.

i = Profinet1.PlcPortAddress__

Following line sets component’s PlcPortAddress property.

Profinet1.PlcPortAddress__ = i

 

Property PollInterval_() As UInt16:

Gets or sets the Poll Interval property of the component.

Following line assings Poll Interval value to “i” variable..

i = Profinet1.PollTime_

Following line sets Poll Interval property of the component.

Profinet1.PollTime_ = i

 

Public Sub NotAvailableTagName(ByVal TagName As Array):

(For COM Component: Public Sub NotAvailableTagName(ByVal TagName As String)):

Imports existing Tag List to component If your application project contains more than one Profinet Component or there are another Tags in the project. Checks tag names for being unique with the component’s and given tags.

The parameter that passed to this method is varies according to being component NET or COM.

For NET Component, tags should given in array type.

For COM component, tagnames should be passed as a string type and separated by chr(20) character.(Tagname as string =”Tag_1 & chr(20) & Tag_2″)

 

Function TagList_():

Returns whole tag list as an array.

Following line assigns Tag List to array named “TagArray”.

TagArray = Profinet1.TagList_

 

Function TagListErr_():

Returns False if erroneous value in Tag list. Returns True if no erroneous value.

Following code notifies user about the Erroneous Value.

If Profinet1.TagListErr_ = False Then

            MsgBox(“Tag table found error!”)

       Exit Sub

End If

 

Property GroupCycle_(ByVal GroupName As String) As UInt16:

Sets or gets cycle value of given group.

Following line sets the Cycle value of the group which indicated by “gr_name” variable.

Profinet1.GroupCycle_(gr_name) = i

Following line assigns Cycle value of the group which indicated by “gr_name” to i.

i = Profinet1.GroupCycle_(gr_name)

 

Property FileMenu_() As Boolean:

Sets or gets the visibility of the File menü buttons.

Following line sets the visibility of the File Menü to false.

Profinet1.FileMenu_ = False

 

Property ConnectButton_() As Boolean:

Sets or gets the visibility of the Connect – Disconnect buttons.

Following line sets the visibility of the Connect – Disconnect buttons to false.

Profinet1.ConnectButton_ = False

 

Property ToolStrip_() As Boolean:

Sets or gets the visibility of the ToolStrip.

Following line sets the visibility of the ToolStrip to false.

Profinet1.ToolStrip_ = False

 

Property StatusStrip_() As Boolean:

Sets or gets the visibility of the StatusStrip.

Following line sets the visibility of the StatusStrip to false.

Profinet1.StatusStrip_ = False

 

Property TreeviewMenu_() As Boolean:

Enables or disables right click menu of the Network TreeView.

Following line disables right click menu of the Network TreeView.

Profinet1.TreeviewMenu_ = False

 

Property DataGridMenu_() As Boolean:

Enables or disables right click menu of the Tag List.

Following line disables right click menu of the Tag List.

Profinet1.DataGridMenu_ = False