S7 Mpi ActiveX Propert:
Public AutoStart_ As Boolean False means close True means open. When PLC off or cannot established connection by other reason communication cannot be started. If this option set true ActiveX will try to connect continuously. Thus communication will start when PLC is ready.
Property Value_(ByVal TagId As UInt32) As String You can use for the writing set value or reading current value. TagId is the line number at the Tag list.
Public FileName_ As String You can read active file name from this variable.
Property LoadSettings_() As String If you give file path in this property automaticaly opens the file. Return value of this property is file path.
Public Sub SaveSettings_(ByVal value As String) Saves existing information with given file name. File name must contain path.
Property Connect_() As Boolean Connects to PLC when this property is true. Disconnects when false. You can query connection state from this property. Returns True when trying to connect to the PLC. You can get the real state from the variable at the bottom.
Public Connection_ As Boolean You can read connection state from this variable. This will true after the establishing connection.
Property PcMpiAdress_() As UInt16 You can query and change PC MPI Network address.
Property PcBaudrate_() As UInt32 You can query and change PC Baudrate value. This value completely distinct from MPI baudrate value. Some adapters support high speed connection.
Property ComPort_() As String You can query and change PC serial port name.
Property PollInterval_() As UInt16 You can query and change Poll.Interval value.
Property PlcBaudrate_() As UInt32 You can query and change Mpi Baudrate value. (Can be 19200 or 187500)
Property StationAdress_() As UInt16 You can query and change PLC MPI adress.
Function TagList_() When this function runs returns all of the Tag list as an Array.
Function TagListErr_() Returns If tag list has erroneus value returns False if not returns True.
Public Sub NotAvailableTagName(ByVal TagName As Array) When you use more than one MPI or when you have tags other than this ActiveX you can write existing tag list to the AcvtiveX with this function. Thus while checking tag names that in the ActiveX this list checked too. Thus providing unique tag names controlled in this list and at other tags.
Property GroupCycle_(ByVal GroupName As String) As UInt16 Returns or changes cycle values of entered group.
Property FileMenu_() As Boolean Gets or sets visible or hidden states of file menu buttons.
Property ConnectButton_() As Boolean Gets or sets visible or hidden states of Connect and Disconnect buttons.
Property ToolStrip_() As Boolean Gets or sets visible or hidden states of ToolStrip.
Property StatusStrip_() As Boolean Gets or sets visible or hidden states of StatusStrip.
Property TreeviewMenu_() As Boolean Disables or enables right click menu on MPI Network treeview.
Property DataGridMenu_() As Boolean Disables or enables right click menu on Tag list.
Event:
Event MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs)
Event MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs)
Event MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs)
Event KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs)
Event Connected_(ByVal sender As Object, ByVal Status As Boolean) Reports state data to main program as an interrupt when connection established or disconnected.
Event ReadValue_(ByVal sender As Object, ByVal TagId As UInt32, ByVal Value As String) When read operation from PLC occured if read value different from previously read value this interrupt reports tag value to the main program with line number at the tag list. All tag values sent once when communication first started.
Event ReadErr_(ByVal sender As Object, ByVal TagId As UInt32) The errors while PLC read operations reported to the main program with line number at the tag list.
Event SetErr_(ByVal sender As Object, ByVal TagId As UInt32) When set values not appropriate or can't written to the PLC the error reports to the main program with line number at the tag list.
Event TimeOut_(ByVal sender As Object) When cannot established connection with the PLC reports timeout state of the ActiveX to the main program.
Event GenericErr_(ByVal sender As Object, ByVal Message As String) Many error reports to main program with this interrupt. This interrupt contains error message also.