Hostlink

 Many automation project requires communication with Host-Link(Omron). You can use Host-Link(Omron) ActiveX with is flexible structure in your projects as a Host-Link(Omron) communication interface. Host-Link(Omron) ActiveX is sold with company license. License owners can use this Activex without limitation. At Host-Link(Omron) ActiveX, .NET Framework 3.5 is used. This ActiveX has a very high communication speed.
ActiveX made by considering to easily meet other probable needs of program and easily attach to user’s programs.For this purpose functions that is not contained by ordinary ActiveX’s are added for example project save, open saved data.
Thus you can finish your project’s all operations about Host-Link(Omron) in a couple minutes.

 

Host-Link

 

 

Full Licence 1000 Usd.

Download link will be only displayed to registered users. [member]Download [/member]
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:

HostLink_1.AutoStart_ = True

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

i = HostLink_1.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:

HostLink_1.Value_(1) = 100

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

i = HostLink_1.Value_(1)

 

Public FileName_ As String:

Returns the file name which contains active settings.

Example: Following line displays the active settings file name.

MsgBox(HostLink_1.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.

HostLink_1.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.

HostLink_1.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:

HostLink_1.Connect_ = True

Disconnects with following line:

HostLink_1.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= HostLink_1.Connection_

 

Property PcBaudrate_() As UInt32:

Gets or Sets the PC Baudrate property of component.

Following line assigns PC Baudrate value to “str” variable.

str = HostLink_1.PcBaudrate_

Following line sets Component’s PC Baudrate property.

HostLink_1.PcBaudrate_ = str

 

Property ComPort_() As String:

Gets or sets the Com Port that component uses.

Following line assigns the Com port’s name that component uses to “str” variable.

str = HostLink_1.ComPort_

Following line sets the component’s com port to the which indicated by “str” variable.

HostLink_1.ComPort_ = str

 

Property PcParity_() As String:

Gets or sets the PC Parity.

Following line sets components Pc parity.

HostLink_1.PcParity_=str

Following line assigns component’s parity to “str” variable.

str = HostLink_1.PcParity_

 

Property PcStopBit_() As UInt16:

Gets or sets the component’s PC Stop Bit.

Following line sets the component’s Pc Stop Bit.

HostLink_1.PcStopBit_ = i

Following line assigns component’s PC Stop Bit value to variable “i”.

i = HostLink_1.PcStopBit_

 

Property PcDataBit_() As UInt16:

Gets or sets the component’s PC Data Bit.

Following line sets the component’s PC Data Bit.

HostLink_1.PcDataBit_  = i

Following line assigns component’s PC Data Bit value to variable “i”.

i = HostLink_1.PcDataBit_

 

Property PcFlowCon_() As String:

Gets or Sets PC Flow Control type.

Following line sets component’s PC Flow Control property with the “str” variable.

HostLink_1.PcFlowCon_ =  str

Following line assigns component’s PC Flow Control value to “str” variable.

str = HostLink_1.PcFlowCon_

 

Property PollInterval_() As UInt16:

Gets or sets components Poll.Interval property.

Following line sets component’s Poll Time property.

HostLink_1.PollTime_ = i

Following line assigns component’s Poll Time value to “i” variable.

i = HostLink_1.PollTime_

 

Property TimeOutTime_() As UInt16:

Gets or sets component’ s Timeout period.

Following line sets component’s Timeout period.

HostLink_1.TimeOutTime_ = i

Following line assigns components Timeout value to “i” variable.

i = HostLink_1.TimeOutTime_

 

Property StationAdress_(ByVal StationName As String) As UInt16:

Gets or sets PLC address.

Following line sets the address number of the station that indicated by “st_name” variable.

HostLink_1.StationAdress_(st_name) = i

Following line Assigns address number of the station that indicated by “st_name” to i variable.

i = HostLink_1.StationAdress_(st_name)

 

Property FailRepeatedQueries_(ByVal StationName As String) As UInt16:

Gets or sets that how many times the query will be repeated when connection fails.

Following line sets the Fail Repeated Queries of the station which indicated by “st_name”.

HostLink_1.FailRepeatedQueries_(st_name) = i

Following line assigns the fail repeated queries number of station which indicated by variable “st_name” to i.

i =HostLink_1.FailRepeatedQueries_(st_name)

 

Function TagList_():

Returns whole tag list as an array.

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

TagArray = HostLink_1.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 HostLink_1.TagListErr_ = False Then

            MsgBox(“Tag table found error!”)

       Exit Sub

End If

 

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 Host-Link 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″)

 

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.

HostLink_1.GroupCycle_(gr_name) = i

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

i = HostLink_1.GroupCycle_(gr_name)

 

Property FileMenu_() As Boolean:

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

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

HostLink_1.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.

HostLink_1.ConnectButton_ = False

 

Property ToolStrip_() As Boolean:

Sets or gets the visibility of the ToolStrip.

Following line sets the visibility of the ToolStrip to false.

HostLink_1.ToolStrip_ = False

 

Property StatusStrip_() As Boolean:

Sets or gets the visibility of the StatusStrip.

Following line sets the visibility of the StatusStrip to false.

HostLink_1.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.

HostLink_1.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.

HostLink_1.DataGridMenu_ = False

 

Component Events:
COM Component
.NET Component
Explanation
Event MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs)
Event MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs)
The event that triggerred when mouse button get down on the component.
Event MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs)
Event MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs)
The event that triggerred when mouse moved on the component.
Event MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs)
Event MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs):
The event that triggerred when mouse button up on the component.
Event KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs)
Event KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs):
The event that triggerred when keyboard key down on the component.
Event Connectedcom(ByVal sender As Object, ByVal Status As Boolean)
Event Connected_(ByVal sender As Object, ByVal Status As Boolean)
The event that triggerred when component connected.
Event ReadValuecom(ByVal sender As Object, ByVal TagId As UInt32, ByVal Value As String)
Event ReadValue_(ByVal sender As Object, ByVal TagId As UInt32, ByVal Value As String)
The event that triggerred when  value different than previously value which read from the PLC. This event sends Tag value with tag’s row index(Tag_Id) to application. All tag values is sent once to main application when communication started.
Event ReadErrcom(ByVal sender As Object, ByVal TagId As UInt32)
Event ReadErr_(ByVal sender As Object, ByVal TagId As UInt32)
The error which occurs while reading from PLC are sent to main application with tag’s row index(TagId).
Event SetErrcom(ByVal sender As Object, ByVal TagId As UInt32)
Event SetErr_(ByVal sender As Object, ByVal TagId As UInt32)
The error which occurs while writing to PLC, it passed to the main application with tag’s row index(TagId).
Event TimeOutcom(ByVal sender As Object, ByVal StationName As String)
Event TimeOut_(ByVal sender As Object, ByVal StationName As String)
Sends the component’s connection  timeout status to main application when PLC connection unsuccessful.
Event GenericErrcom(ByVal sender As Object, ByVal Message As String)
Event GenericErr_(ByVal sender As Object, ByVal Message As String)
The other errors is informed to main application with this event. This contains error message as well.